Class: Selenium::WebDriver::Safari::Options
- Defined in:
- rb/lib/selenium/webdriver/safari/options.rb
Constant Summary collapse
- CAPABILITIES =
{automatic_inspection: 'safari:automaticInspection', automatic_profiling: 'safari:automaticProfiling'}.freeze
- BROWSER =
Selenium::WebDriver::Safari.technology_preview? ? 'Safari Technology Preview' : 'safari'
Constants inherited from Options
Options::GRID_OPTIONS, Options::W3C_OPTIONS
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
Methods inherited from Options
#==, chrome, edge, firefox, ie, #initialize, safari, set_capabilities
Constructor Details
This class inherits a constructor from Selenium::WebDriver::Options
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
24 25 26 |
# File 'rb/lib/selenium/webdriver/safari/options.rb', line 24 def @options end |
Instance Method Details
#add_option(name, value = nil) ⇒ Object
31 32 33 34 35 36 |
# File 'rb/lib/selenium/webdriver/safari/options.rb', line 31 def add_option(name, value = nil) key = name.is_a?(Hash) ? name.keys.first : name raise ArgumentError, 'Safari does not support options that are not namespaced' unless key.to_s.include?(':') super end |
#as_json ⇒ Object
38 39 40 41 |
# File 'rb/lib/selenium/webdriver/safari/options.rb', line 38 def as_json(*) @options[:browser_name] = Safari.technology_preview? ? 'Safari Technology Preview' : 'safari' super end |