Class: AutomationHelpers::Drivers::V4::Local
- Inherits:
-
Object
- Object
- AutomationHelpers::Drivers::V4::Local
- Defined in:
- lib/automation_helpers/drivers/v4/local.rb
Overview
The Local Driver that will spin up and run on your machine (Without connecting to any grid)
Instance Attribute Summary collapse
-
#browser ⇒ Object
readonly
Returns the value of attribute browser.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(browser, options = Options.for(browser)) ⇒ Local
constructor
Initial setup options.
-
#register ⇒ Nil
Register a new driver with the default selenium name for use locally.
Constructor Details
#initialize(browser, options = Options.for(browser)) ⇒ Local
Initial setup options
- browser (required) - When instantiating, the first argument must be the symbol that represents what browser to use
- options (optional) -> You can instantiate an Options payload that can be used when registering your driver
20 21 22 23 |
# File 'lib/automation_helpers/drivers/v4/local.rb', line 20 def initialize(browser, = Options.for(browser)) @browser = browser = end |
Instance Attribute Details
#browser ⇒ Object (readonly)
Returns the value of attribute browser.
14 15 16 |
# File 'lib/automation_helpers/drivers/v4/local.rb', line 14 def browser @browser end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
14 15 16 |
# File 'lib/automation_helpers/drivers/v4/local.rb', line 14 def end |
Instance Method Details
#register ⇒ Nil
Register a new driver with the default selenium name for use locally
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/automation_helpers/drivers/v4/local.rb', line 28 def register .register_driver :selenium do |app| ::Selenium::Driver.new( app, browser: browser, service: service, options: ) end end |