Class: AutomationHelpers::Drivers::V4::Local

Inherits:
Object
  • Object
show all
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 Method Summary collapse

Constructor Details

#initialize(browser) ⇒ Local

#### Initial setup options

  • browser (required) - When instantiating, the first argument must be the symbol that represents what browser to use



21
22
23
# File 'lib/automation_helpers/drivers/v4/local.rb', line 21

def initialize(browser)
  @browser = browser
end

Instance Method Details

#registerNil

Register a new driver with the default selenium name for use locally

Returns:

  • (Nil)


28
29
30
31
32
33
34
35
36
37
# File 'lib/automation_helpers/drivers/v4/local.rb', line 28

def register
  Capybara.register_driver :selenium do |app|
    Capybara::Selenium::Driver.new(
      app,
      browser: browser,
      service: service,
      options: options
    )
  end
end