You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure what the correct way to do it is now, but the following appears to work for me (noting the redundant setting of path). Loathe to submit a PR when I don't actually understand how it all works...
chrome_bin = ENV.fetch('GOOGLE_CHROME_SHIM', nil)
options = Selenium::WebDriver::Chrome::Options.new
# ... I don't think this does anything
options.binary = chrome_bin if chrome_bin
# Discovered this by spelunking in the webdrivers code. I'm not really sure
# how all these gems interact...
Selenium::WebDriver::Chrome.path = chrome_bin
# Comment out for debugging
options.add_argument('--headless')
Capybara.register_driver :chrome do |app|
Capybara::Selenium::Driver.new(
app,
browser: :chrome,
options: options
)
end
The text was updated successfully, but these errors were encountered:
I'm not sure what the correct way to do it is now, but the following appears to work for me (noting the redundant setting of path). Loathe to submit a PR when I don't actually understand how it all works...
The text was updated successfully, but these errors were encountered: