File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
lib/selenium/webdriver/chrome
spec/unit/selenium/webdriver/chrome Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ def create_capabilities(opts)
74
74
caps = opts . delete ( :desired_capabilities ) { Remote ::Capabilities . chrome }
75
75
options = opts . delete ( :options ) { Options . new }
76
76
77
- args = opts . delete ( :args ) || opts . delete ( :switches ) || [ ]
77
+ args = opts . delete ( :args ) || opts . delete ( :switches )
78
78
if args
79
79
WebDriver . logger . deprecate ':args or :switches' , 'Selenium::WebDriver::Chrome::Options#add_argument'
80
80
raise ArgumentError , ':args must be an Array of Strings' unless args . is_a? Array
Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ module Chrome
40
40
expect ( caps [ :chrome_options ] [ :args ] ) . to eq ( %w[ --foo=bar ] )
41
41
end
42
42
43
+ it 'sets the args capability from switches' do
44
+ Driver . new ( http_client : http , switches : %w[ --foo=bar ] )
45
+
46
+ expect ( caps [ :chrome_options ] [ :args ] ) . to eq ( %w[ --foo=bar ] )
47
+ end
48
+
43
49
it 'sets the proxy capabilitiy' do
44
50
proxy = Proxy . new ( http : 'localhost:1234' )
45
51
Driver . new ( http_client : http , proxy : proxy )
You can’t perform that action at this time.
0 commit comments