-
Notifications
You must be signed in to change notification settings - Fork 110
Heroku buildpack google chrome
Lakshya Kapoor edited this page Jul 25, 2019
·
16 revisions
Use either of these options if you're using heroku-buildpack-google-chrome
to help webdrivers
find the install path to Google Chrome.
Option 1: Set the WD_CHROME_PATH
environment variable to whatever $GOOGLE_CHROME_SHIM
points to.
$ echo $GOOGLE_CHROME_SHIM
=> /app/.apt/usr/bin/google-chrome-stable
$ RAILS_ENV=test bundle exec rake webdrivers:chromedriver:update WD_CHROME_PATH=/app/.apt/usr/bin/google-chrome-stable
Option 2: Set Selenium::WebDriver::Chrome.path
(in your code) to whatever $GOOGLE_CHROME_SHIM
points to.
require 'webdrivers'
Selenium::WebDriver::Chrome.path = ENV.fetch('GOOGLE_CHROME_SHIM', nil)
driver = Selenium::WebDriver.for :chrome
Source
https://github.com/titusfortner/webdrivers/issues/72
https://github.com/heroku/heroku-buildpack-google-chrome#selenium