From 936a7023904ea7f98fd9b311a98e7ac8c899610e Mon Sep 17 00:00:00 2001 From: Lakshya Kapoor <4314581+kapoorlakshya@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:05:57 +0000 Subject: [PATCH] Fix custom chrome path --- .github/workflows/tests.yml | 2 +- spec/spec_helper.rb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9b35902..9306773 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -68,7 +68,7 @@ jobs: with: chrome-version: 114 install-dependencies: true - - run: set WD_CHROME_PATH=${{ steps.setup-chrome.outputs.chrome-path }} + - run: $env:WD_CHROME_PATH = '${{ steps.setup-chrome.outputs.chrome-path }}' - name: Run tests run: bundle exec rake spec diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2eb2a48..7c30ec1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -26,7 +26,11 @@ if OS.windows? # Set by 'browser-actions/setup-chrome' step in CI - Selenium::WebDriver::Chrome.path = ENV.fetch('WD_CHROME_PATH', nil) + chrome_path = ENV.fetch('WD_CHROME_PATH', nil) + raise 'Custom chrome path was nil.' if chrome_path.nil? + + puts "Custom chrome path: #{chrome_path}" + Selenium::WebDriver::Chrome.path = chrome_path end #