I'm getting the error above when trying to run Selenium on Heroku, RoR app.
I've added the buildpacks heroku-buildpack-google-chrome and heroku-buildpack-chromedriver
Then added the config variables
GOOGLE_CHROME_SHIM=/app/.apt/opt/google/chrome/chrome
GOOGLE_CHROME_BIN=/app/.apt/opt/google/chrome/chrome
And added this code on the capybara setup:
chrome_bin = ENV.fetch('GOOGLE_CHROME_SHIM', nil)
chrome_opts = chrome_bin ? { "chromeOptions" => { "binary" => chrome_bin } } : {}
Capybara.register_driver :chrome do |app| Capybara::Selenium::Driver.new(
app,
browser: :chrome,
desired_capabilities: Selenium::WebDriver::Remote::Capabilities.chrome(chrome_opts), ) end
Capybara.javascript_driver = :chrome
As described on the chrome link: https://github.com/heroku/heroku-buildpack-google-chrome
Do I need to set up another variable for the location of the webdriver? If yes, how? and how do I assign it?
Thanks