Method: Selenium::WebDriver::Options#initialize

Defined in:
lib/selenium/webdriver/common/options.rb

#initialize(options: nil, **opts) ⇒ Options

Returns a new instance of Options.



69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/selenium/webdriver/common/options.rb', line 69

def initialize(options: nil, **opts)
  self.class.set_capabilities

  @options = if options
               WebDriver.logger.deprecate(":options as keyword for initializing #{self.class}",
                                          "custom values directly in #new constructor",
                                          id: :options_options)
               opts.merge(options)
             else
               opts
             end
  @options[:browser_name] = self.class::BROWSER
end