Register Selinium Webdriver
jessethebuilder opened this issue · 1 comments
jessethebuilder commented
I could not use the existing solution in the readme, and even the keyword :desired_capabilities when declaring a new Capybara::Selenium::Driver throws an error. My solution is below, which works for automating Chrome on Heroku. I had to set GOOGLE_CHROME_SHIM to "/usr/bin/google-chrome" manually in Heroku.
Capybara.register_driver :heroku_chrome do |app|
Capybara::Selenium::Driver.new(
app,
browser: :chrome,
options: Selenium::WebDriver::Chrome::Options.new(
binary: ENV.fetch('GOOGLE_CHROME_SHIM')
)
)
end
joshuacronemeyer commented
This helped me. The readme seems out of date