File tree Expand file tree Collapse file tree 10 files changed +14
-87
lines changed
integration/selenium/webdriver/firefox Expand file tree Collapse file tree 10 files changed +14
-87
lines changed Original file line number Diff line number Diff line change @@ -34,20 +34,15 @@ def initialize(opts = {})
34
34
35
35
unless opts . key? ( :url )
36
36
driver_path = opts . delete ( :driver_path ) || Chrome . driver_path
37
+ driver_opts = opts . delete ( :driver_opts ) || { }
37
38
port = opts . delete ( :port ) || Service ::DEFAULT_PORT
38
39
39
- opts [ :driver_opts ] ||= { }
40
40
if opts . key? :service_log_path
41
41
WebDriver . logger . deprecate ':service_log_path' , "driver_opts: {log_path: '#{ opts [ :service_log_path ] } '}"
42
- opts [ : driver_opts] [ :log_path ] = opts . delete :service_log_path
42
+ driver_opts [ :log_path ] = opts . delete :service_log_path
43
43
end
44
44
45
- if opts . key? :service_args
46
- WebDriver . logger . deprecate ':service_args' , "driver_opts: {args: #{ opts [ :service_args ] } }"
47
- opts [ :driver_opts ] [ :args ] = opts . delete ( :service_args )
48
- end
49
-
50
- @service = Service . new ( driver_path , port , opts . delete ( :driver_opts ) )
45
+ @service = Service . new ( driver_path , port , driver_opts )
51
46
@service . start
52
47
opts [ :url ] = @service . uri
53
48
end
Original file line number Diff line number Diff line change @@ -32,15 +32,10 @@ def initialize(opts = {})
32
32
33
33
unless opts . key? ( :url )
34
34
driver_path = opts . delete ( :driver_path ) || Edge . driver_path
35
+ driver_opts = opts . delete ( :driver_opts ) || { }
35
36
port = opts . delete ( :port ) || Service ::DEFAULT_PORT
36
37
37
- opts [ :driver_opts ] ||= { }
38
- if opts . key? :service_args
39
- WebDriver . logger . deprecate ':service_args' , "driver_opts: {args: #{ opts [ :service_args ] } }"
40
- opts [ :driver_opts ] [ :args ] = opts . delete ( :service_args )
41
- end
42
-
43
- @service = Service . new ( driver_path , port , opts . delete ( :driver_opts ) )
38
+ @service = Service . new ( driver_path , port , driver_opts )
44
39
@service . host = 'localhost' if @service . host == '127.0.0.1'
45
40
@service . start
46
41
opts [ :url ] = @service . uri
Original file line number Diff line number Diff line change @@ -35,15 +35,10 @@ def initialize(opts = {})
35
35
36
36
unless opts . key? ( :url )
37
37
driver_path = opts . delete ( :driver_path ) || Firefox . driver_path
38
+ driver_opts = opts . delete ( :driver_opts ) || { }
38
39
port = opts . delete ( :port ) || Service ::DEFAULT_PORT
39
40
40
- opts [ :driver_opts ] ||= { }
41
- if opts . key? :service_args
42
- WebDriver . logger . deprecate ':service_args' , "driver_opts: {args: #{ opts [ :service_args ] } }"
43
- opts [ :driver_opts ] [ :args ] = opts . delete ( :service_args )
44
- end
45
-
46
- @service = Service . new ( driver_path , port , opts . delete ( :driver_opts ) )
41
+ @service = Service . new ( driver_path , port , driver_opts )
47
42
@service . start
48
43
opts [ :url ] = @service . uri
49
44
end
Original file line number Diff line number Diff line change @@ -33,21 +33,16 @@ def initialize(opts = {})
33
33
34
34
unless opts . key? ( :url )
35
35
driver_path = opts . delete ( :driver_path ) || IE . driver_path
36
+ driver_opts = opts . delete ( :driver_opts ) || { }
36
37
port = opts . delete ( :port ) || Service ::DEFAULT_PORT
37
38
38
- opts [ :driver_opts ] ||= { }
39
- if opts . key? :service_args
40
- WebDriver . logger . deprecate ':service_args' , "driver_opts: {args: #{ opts [ :service_args ] } }"
41
- opts [ :driver_opts ] [ :args ] = opts . delete ( :service_args )
42
- end
43
-
44
39
%i[ log_level log_file implementation ] . each do |method |
45
40
next unless opts . key? method
46
41
WebDriver . logger . deprecate ":#{ method } " , "driver_opts: {#{ method } : '#{ opts [ method ] } '}"
47
- opts [ : driver_opts] [ method ] = opts . delete ( method )
42
+ driver_opts [ method ] = opts . delete ( method )
48
43
end
49
44
50
- @service = Service . new ( driver_path , port , opts . delete ( : driver_opts) )
45
+ @service = Service . new ( driver_path , port , driver_opts )
51
46
@service . start
52
47
opts [ :url ] = @service . uri
53
48
end
Original file line number Diff line number Diff line change @@ -32,15 +32,10 @@ def initialize(opts = {})
32
32
33
33
unless opts . key? ( :url )
34
34
driver_path = opts . delete ( :driver_path ) || Safari . driver_path
35
+ driver_opts = opts . delete ( :driver_opts ) || { }
35
36
port = opts . delete ( :port ) || Service ::DEFAULT_PORT
36
37
37
- opts [ :driver_opts ] ||= { }
38
- if opts . key? :service_args
39
- WebDriver . logger . deprecate ':service_args' , "driver_opts: {args: #{ opts [ :service_args ] } }"
40
- opts [ :driver_opts ] [ :args ] = opts . delete ( :service_args )
41
- end
42
-
43
- @service = Service . new ( driver_path , port , opts . delete ( :driver_opts ) )
38
+ @service = Service . new ( driver_path , port , driver_opts )
44
39
@service . start
45
40
opts [ :url ] = @service . uri
46
41
end
Original file line number Diff line number Diff line change @@ -86,9 +86,8 @@ module WebDriver
86
86
expect { driver . capabilities . browser_version } . to_not raise_exception
87
87
end
88
88
89
- caps = Remote ::Capabilities . firefox ( firefox_options : { binary : ENV [ 'ALT_FIREFOX_BINARY' ] } ,
90
- service_args : { binary : path } )
91
- create_driver! ( desired_capabilities : caps ) do |driver |
89
+ caps = Remote ::Capabilities . firefox ( firefox_options : { binary : ENV [ 'ALT_FIREFOX_BINARY' ] } )
90
+ create_driver! ( desired_capabilities : caps , driver_opts : { binary : path } ) do |driver |
92
91
expect ( driver . capabilities . version ) . to_not eql ( @default_version )
93
92
expect { driver . capabilities . browser_version } . to_not raise_exception
94
93
end
Original file line number Diff line number Diff line change @@ -68,17 +68,6 @@ module Chrome
68
68
expect ( driver . instance_variable_get ( "@service" ) . instance_variable_get ( "@extra_args" ) ) . to eq args
69
69
end
70
70
71
- it 'deprecates `service_args`' do
72
- args = [ "--port-server=2323" ,
73
- "--whitelisted-ips=['192.168.0.1', '192.168.0.2']" ,
74
- "--silent" ,
75
- "--log-path=/path/to/log" ]
76
-
77
- expect ( WebDriver . logger ) . to receive ( :deprecate ) . with ( ':service_args' , "driver_opts: {args: #{ args } }" )
78
- @driver = Driver . new ( http_client : http , service_args : args )
79
- expect ( @driver . instance_variable_get ( "@service" ) . instance_variable_get ( "@extra_args" ) ) . to eq args
80
- end
81
-
82
71
it 'deprecates `service_log_path`' do
83
72
message = %r{\[ DEPRECATION\] `:service_log_path` is deprecated. Use `driver_opts: {log_path: \/ path\/ to\/ log}`}
84
73
Original file line number Diff line number Diff line change @@ -65,17 +65,6 @@ module Edge
65
65
driver = Driver . new ( http_client : http , driver_opts : driver_opts )
66
66
expect ( driver . instance_variable_get ( "@service" ) . instance_variable_get ( "@extra_args" ) ) . to eq args
67
67
end
68
-
69
- it 'deprecates `service_args`' do
70
- args = [ "--port-server=2323" ,
71
- "--whitelisted-ips=['192.168.0.1', '192.168.0.2']" ,
72
- "--silent=true" ,
73
- "--log-path=/path/to/log" ]
74
-
75
- expect ( WebDriver . logger ) . to receive ( :deprecate ) . with ( ':service_args' , "driver_opts: {args: #{ args } }" )
76
- @driver = Driver . new ( http_client : http , service_args : args )
77
- expect ( @driver . instance_variable_get ( "@service" ) . instance_variable_get ( "@extra_args" ) ) . to eq args
78
- end
79
68
end
80
69
end # Edge
81
70
end # WebDriver
Original file line number Diff line number Diff line change @@ -67,18 +67,6 @@ module Firefox
67
67
driver = Driver . new ( http_client : http , driver_opts : driver_opts )
68
68
expect ( driver . instance_variable_get ( "@service" ) . instance_variable_get ( "@extra_args" ) ) . to eq args
69
69
end
70
-
71
- it 'deprecates `service_args`' do
72
- args = [ "--binary=/path/to/bin" ,
73
- "–-log=/path/to/log" ,
74
- "–-marionette-port=9721" ,
75
- "–-host=localhost" ]
76
-
77
- expect ( WebDriver . logger ) . to receive ( :deprecate ) . with ( ':service_args' , "driver_opts: {args: #{ args } }" )
78
- @driver = Driver . new ( http_client : http , service_args : args )
79
- expect ( @driver . instance_variable_get ( "@service" ) . instance_variable_get ( "@extra_args" ) ) . to eq args
80
- end
81
-
82
70
end
83
71
end # Firefox
84
72
end # WebDriver
Original file line number Diff line number Diff line change @@ -71,19 +71,6 @@ module IE
71
71
driver = Driver . new ( http_client : http , driver_opts : driver_opts )
72
72
expect ( driver . instance_variable_get ( "@service" ) . instance_variable_get ( "@extra_args" ) ) . to eq args
73
73
end
74
-
75
- it 'deprecates `service_args`' do
76
- args = [ "--log-level=DEBUG" ,
77
- "--log-file=/foo" ,
78
- "--implementation=VENDOR" ,
79
- "--host=localhost" ,
80
- "--extract_path=/bar" ,
81
- "--silent" ]
82
-
83
- expect ( WebDriver . logger ) . to receive ( :deprecate ) . with ( ':service_args' , "driver_opts: {args: #{ args } }" )
84
- @driver = Driver . new ( http_client : http , service_args : args )
85
- expect ( @driver . instance_variable_get ( "@service" ) . instance_variable_get ( "@extra_args" ) ) . to eq args
86
- end
87
74
end
88
75
end # IE
89
76
end # WebDriver
You can’t perform that action at this time.
0 commit comments