Skip to content

Instantly share code, notes, and snippets.

@nativestranger
Created March 16, 2017 17:45
Show Gist options
  • Save nativestranger/939c5043a93c54e853c94c0c8307d67a to your computer and use it in GitHub Desktop.
Save nativestranger/939c5043a93c54e853c94c0c8307d67a to your computer and use it in GitHub Desktop.
Capybara.register_driver :sauce do |app|
Capybara::Selenium::Driver.new(
app,
browser: :remote,
url: "http://#{ ENV['SAUCE_USER_NAME'] }:#{ ENV['SAUCE_API_KEY'] }@ondemand.saucelabs.com:80/wd/hub",
desired_capabilities: { 'browserName' => ENV['SELENIUM_BROWSER'],
'version' => ENV['SELENIUM_VERSION'],
'platform' => ENV['SELENIUM_PLATFORM'] }
)
end
Capybara.current_driver = :sauce
Capybara.javascript_driver = :sauce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment