Module: Applitools::Selenium::Capybara::CapybaraSettings

Defined in:
lib/applitools/capybara/capybara_settings.rb

Instance Method Summary collapse

Instance Method Details

#register_capybara_driver(options = {}) ⇒ Object

Registers Capybara driver which will be used by eyes and sets it as default Capybara driver. The name of the driver is :eyes, and the driver is a descendant of class Capybara::Selenium::Driver. Options are eventually passed to drivers constructor

Examples:

Applitools.register_capybara_driver :browser => :chrome
Applitools.register_capybara_driver :browser => :remote, :url => 'remote_url', :desired_capabilities => {}

Parameters:

  • options (Hash) (defaults to: {})


15
16
17
18
19
20
21
# File 'lib/applitools/capybara/capybara_settings.rb', line 15

def register_capybara_driver(options = {})
  ::Capybara.register_driver :eyes do |app|
    Applitools::Selenium::Capybara::Driver.new app, options
  end
  ::Capybara.default_driver = :eyes
  ::Capybara.javascript_driver = :eyes
end