[rb] support :switches for chrome with deprecation
@@ -74,9 +74,9 @@ module Selenium
caps = opts.delete(:desired_capabilities) { Remote::Capabilities.chrome }
options = opts.delete(:options) { Options.new }
- args = opts.delete(:args)
+ args = opts.delete(:args)|| opts.delete(:switches) || []
if args
- WebDriver.logger.deprecate ':args', 'Selenium::WebDriver::Chrome::Options#add_argument'
+ WebDriver.logger.deprecate ':args or :switches', 'Selenium::WebDriver::Chrome::Options#add_argument'
raise ArgumentError, ':args must be an Array of Strings' unless args.is_a? Array
args.each { |arg| options.add_argument(arg.to_s) }
end
