Created
June 22, 2018 22:19
-
-
Save cheesepaulo/d7e967f7434553043511a6a8637eced9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Capybara config with docker-compose environment vars | |
Capybara.app_host = "http://#{ENV['TEST_APP_HOST']}:#{ENV['TEST_PORT']}" | |
Capybara.default_driver = :selenium | |
Capybara.javascript_driver = :selenium | |
Capybara.run_server = false | |
# Configure the Chrome driver capabilities & register | |
args = ['--no-default-browser-check', '--start-maximized'] | |
caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"args" => args}) | |
Capybara.register_driver :selenium do |app| | |
Capybara::Selenium::Driver.new( | |
app, | |
browser: :remote, | |
url: "http://#{ENV['SELENIUM_HOST']}:#{ENV['SELENIUM_PORT']}/wd/hub", | |
desired_capabilities: caps | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment