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

Constructor Details

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

Instance Attribute Details

#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 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

[ GitHub ]

  
# 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