Closed alexgibson closed 5 months ago
I haven't had time to try this myself yet, but I wonder if setting the PATH would work, e.g by changing npm ci
to PATH=/snap/bin:$PATH npm ci
(assuming that things are getting installed in /snap/bin
).
I haven't had time to try this myself yet, but I wonder if setting the PATH would work, e.g by changing npm ci to PATH=/snap/bin:$PATH npm ci (assuming that things are getting installed in /snap/bin).
I tried adding /snap/bin/firefox
to PATH, but unfortunately it does not seem to make a difference. So I'm not 100% sure if Selenium is looking here when it gets initiated.
I was able to get it working with this change:
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -5,10 +5,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- - name: "Install framebuffer (xvfb), Firefox and Chromium"
+ - name: "Install framebuffer (xvfb) and Chromium"
run: |
sudo apt-get update
- sudo apt-get install chromium-browser firefox xvfb
+ sudo apt-get install chromium-browser xvfb
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
It turns out that the image you're using already includes Firefox and Geckodriver.
Ah, wonderful - thank you!
I'm glad to hear it worked. My hope and expectation is that most people will be in a similar situation, since CI providers ought to have images with working webdriver setups. Making the browser and driver paths configurable is possible but a little ugly, so I'm hoping we won't have to go there.
I'm hitting what I believe is this issue https://github.com/SeleniumHQ/selenium/issues/13169 when trying to run jasmine-browser-runner via GitHub Actions on Ubuntu >= 22.0.4. From my understanding, it is due to Firefox snap being the new default on Ubuntu, but it is installed in a different location.
This is a basic GitHub action template that can reproduce the issue:
From the issue I linked to it does not look like this is something Selenium will fix, since it supports passing alternate paths to the driver/executable already. However given that, I'm not quite sure how I can tell jasmine-browser-runner to instruct Selenium to use a different browser/driver path?