Class: Selenium::WebDriver::Safari::Options

Inherits:
Options
  • Object
show all
Defined in:
lib/selenium/webdriver/safari/options.rb

Constant Summary collapse

CAPABILITIES =
{automatic_inspection: 'safari:automaticInspection',
automatic_profiling: 'safari:automaticProfiling'}.freeze
BROWSER =
'safari'

Constants inherited from Options

Options::W3C_OPTIONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Options

#==, #as_json, chrome, edge, firefox, ie, #initialize, safari, set_capabilities

Constructor Details

This class inherits a constructor from Selenium::WebDriver::Options

Instance Attribute Details

#optionsObject

Returns the value of attribute options.


24
25
26
# File 'lib/selenium/webdriver/safari/options.rb', line 24

def options
  @options
end

Instance Method Details

#add_option(name, value = nil) ⇒ Object

Raises:

  • (ArgumentError)

31
32
33
34
35
36
# File '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