123456789_123456789_123456789_123456789_123456789_

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

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Selenium::WebDriver::Options
Defined in: rb/lib/selenium/webdriver/safari/options.rb

Constant Summary

::Selenium::WebDriver::Options - Inherited

GRID_OPTIONS, W3C_OPTIONS

Class Attribute Summary

Class Method Summary

Instance Attribute Summary

Instance Method Summary

::Selenium::WebDriver::Options - Inherited

Constructor Details

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

Instance Attribute Details

#browser_name (rw)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/safari/options.rb', line 44

def browser_name
  @options[:browser_name] = Safari.technology_preview? ? TECHNOLOGY_PREVIEW : BROWSER
end

#browser_name=(value) (rw)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/safari/options.rb', line 40

def browser_name=(value)
  @options[:browser_name] = value
end

#options (rw)

[ GitHub ]

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

attr_accessor :options

Instance Method Details

#add_option(name, value = nil)

Raises:

  • (ArgumentError)
[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/safari/options.rb', line 33

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

#enable_bidi!Boolean

Enables WebDriver ::Selenium::WebDriver::BiDi for ::Selenium::WebDriver::Safari, which also requires the experimental capability, and warns that Safari's ::Selenium::WebDriver::BiDi support is experimental.

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/safari/options.rb', line 55

def enable_bidi!
  super
  WebDriver.logger.warn("Safari's WebDriver BiDi support is experimental and may be incomplete",
                        id: :safari_bidi)
  @options[:experimental_web_socket_url] = true
end