@@ -61,7 +61,7 @@ def __init__(self, executable_path='IEDriverServer.exe', capabilities=None,
61
61
DeprecationWarning , stacklevel = 2 )
62
62
if capabilities :
63
63
warnings .warn ('capabilities has been deprecated, please pass in an Options object.'
64
- 'This field will be ignored if an Options object is also used .' ,
64
+ 'This field will be ignored.' ,
65
65
DeprecationWarning , stacklevel = 2 )
66
66
if port != DEFAULT_PORT :
67
67
warnings .warn ('port has been deprecated, please pass in a Service object' ,
@@ -79,32 +79,23 @@ def __init__(self, executable_path='IEDriverServer.exe', capabilities=None,
79
79
warnings .warn ('service_log_path has been deprecated, please pass in a Service object' ,
80
80
DeprecationWarning , stacklevel = 2 )
81
81
if desired_capabilities :
82
- warnings .warn ('desired_capabilities has been deprecated, please pass in an Options object' ,
82
+ warnings .warn ('desired_capabilities has been deprecated, please pass in an Options object.'
83
+ 'This field will be ignored' ,
83
84
DeprecationWarning , stacklevel = 2 )
84
85
if keep_alive != DEFAULT_KEEP_ALIVE :
85
86
warnings .warn ('keep_alive has been deprecated, please pass in a Service object' ,
86
87
DeprecationWarning , stacklevel = 2 )
87
88
else :
88
- keep_alive = False
89
+ keep_alive = True
89
90
90
91
self .host = host
91
92
self .port = port
92
93
if self .port == 0 :
93
94
self .port = utils .free_port ()
94
95
95
- # If both capabilities and desired capabilities are set, ignore desired capabilities.
96
- if not capabilities and desired_capabilities :
97
- capabilities = desired_capabilities
98
-
99
96
if not options :
100
- if not capabilities :
101
- capabilities = self .create_options ().to_capabilities ()
102
- else :
103
- if not capabilities :
104
- capabilities = options .to_capabilities ()
105
- else :
106
- # desired_capabilities stays as passed in
107
- capabilities .update (options .to_capabilities ())
97
+ options = self .create_options ()
98
+
108
99
if service :
109
100
self .iedriver = service
110
101
else :
0 commit comments