Last active
November 28, 2017 18:27
-
-
Save raditotev/ab8e5d78ecc6656a4bc8178f9ecc233a to your computer and use it in GitHub Desktop.
Cucumber configuration for SeleniumGrid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ENV['REMOTE'].eql?("true") | |
hub_url = 'http://localhost:4444/wd/hub' | |
capabilities = Selenium::WebDriver::Remote::Capabilities.send(ENV['DRIVER']) | |
capabilities['version'] = ENV['VERSION'] | |
capabilities['takesScreenshot'] = true | |
capabilities['javascriptEnabled'] = true | |
Capybara.register_driver :remote_browser do |app| | |
Capybara::Selenium::Driver.new( | |
app, | |
browser: :remote, | |
url: hub_url, | |
desired_capabilities: capabilities | |
) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment