From 93c47caa4aea2ebd2fcd4b336dafc5e94b885a8f Mon Sep 17 00:00:00 2001 From: benjamin wil Date: Sun, 14 Aug 2022 14:27:04 -0700 Subject: [PATCH] Provide ENV to set a custom Chrome binary path On my system, Chrome is not in the location that the `Selenium::WebDriver` expects it to be by default. This configuration setting lets a developer set the path to the Chrome binary explicitly if necessary. --- test/capybara_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/capybara_helper.rb b/test/capybara_helper.rb index 74b61f96..f5afc9ef 100644 --- a/test/capybara_helper.rb +++ b/test/capybara_helper.rb @@ -3,6 +3,8 @@ require_relative 'helper' require 'selenium-webdriver' require 'capybara/dsl' +Selenium::WebDriver::Chrome.path = ENV['CHROME_PATH'] if ENV['CHROME_PATH'] + CAPYBARA_DRIVER = if ENV['CI'] :selenium_chrome_headless