Skip to content

Instantly share code, notes, and snippets.

@luke-hill
Created November 1, 2017 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luke-hill/b687ab96602910860b4dd78ed5ec78ea to your computer and use it in GitHub Desktop.
Save luke-hill/b687ab96602910860b4dd78ed5ec78ea to your computer and use it in GitHub Desktop.
FF payload
def register_remote_driver(capabilities)
Capybara.register_driver :selenium do |app|
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120
if browser == :firefox
Capybara::Selenium::Driver.new(
app,
browser: :remote,
url: ENV['hub_url'],
desired_capabilities: capabilities,
marionette: true,
#options: firefox_options,
http_client: client,
)
else
Capybara::Selenium::Driver.new(
app,
browser: :remote,
url: ENV['hub_url'],
desired_capabilities: capabilities,
http_client: client,
)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment