Class: Selenium::WebDriver::Safari::Options
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Safari::Options
- Defined in:
- lib/selenium/webdriver/safari/options.rb
Instance Attribute Summary collapse
-
#data_dir ⇒ Object
Returns the value of attribute data_dir.
-
#port ⇒ Object
Returns the value of attribute port.
-
#skip_extension_installation ⇒ Object
Returns the value of attribute skip_extension_installation.
Instance Method Summary collapse
- #as_json ⇒ Object
- #clean_session? ⇒ Boolean
-
#initialize(opts = {}) ⇒ Options
constructor
A new instance of Options.
- #to_capabilities ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Options
Returns a new instance of Options.
26 27 28 |
# File 'lib/selenium/webdriver/safari/options.rb', line 26 def initialize(opts = {}) (opts) end |
Instance Attribute Details
#data_dir ⇒ Object
Returns the value of attribute data_dir.
24 25 26 |
# File 'lib/selenium/webdriver/safari/options.rb', line 24 def data_dir @data_dir end |
#port ⇒ Object
Returns the value of attribute port.
24 25 26 |
# File 'lib/selenium/webdriver/safari/options.rb', line 24 def port @port end |
#skip_extension_installation ⇒ Object
Returns the value of attribute skip_extension_installation.
24 25 26 |
# File 'lib/selenium/webdriver/safari/options.rb', line 24 def skip_extension_installation @skip_extension_installation end |
Instance Method Details
#as_json ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/selenium/webdriver/safari/options.rb', line 41 def as_json { 'port' => port, 'dataDir' => data_dir, 'cleanSession' => clean_session?, } end |
#clean_session? ⇒ Boolean
30 31 32 |
# File 'lib/selenium/webdriver/safari/options.rb', line 30 def clean_session? !!@clean_session end |
#to_capabilities ⇒ Object
34 35 36 37 38 39 |
# File 'lib/selenium/webdriver/safari/options.rb', line 34 def to_capabilities caps = Remote::Capabilities.safari caps.merge!('safari.options' => as_json) caps end |