-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instructions on how to use with Chromium? #188
Comments
Although everything works in development, I'm now running into issues with my CI workflow on GitHub Actions. That environment has some version of Chrome installed which requires a different chromedriver version. This is the drawback of manually specifying the version number. So I'd still be interested in learning how we can use Chromium without hardcoding a version number. Any suggestions? |
I'm getting closer to an alternative solution where you download an older version of Chromium which has a matching chromedriver version. I'll share instructions on how to find such an older version below, but it's not quite right yet. I now have Chromium 88.0.4320 installed which has a matching chromedriver: https://chromedriver.storage.googleapis.com/LATEST_RELEASE_88 However, it's not an exact match and webdrivers tries to download Instructions on how to download an older Chromium version (assuming macOS)
You can sometimes skip step 4. But if there's no exact match, you'll need to know whichever number is closest. The official documentation suggests trial-and-error and just keep trying decrementing the number. But I find using the Homebrew repository a bit faster as it lets you skip right to the next version for which there's a Mac build. |
@marckohlbrugge Thanks for all the information! Let's address these one by one:
Stable versions of both Chrome and Chromium are equally supported by this gem. What's happening in your case is that
Is there an error message you can share? Asking because
It matches on the |
Thanks @kapoorlakshya this was very helpful. Downloading an older version has indeed resolved the issue. Here's two ways to find a stable release for macOS:
Perhaps this could be added to the README or wiki? Although it's worth pointing out these don't seem like official sources.
I don't have the error message anymore, but I believe it tried to look for this non-existent file: https://chromedriver.storage.googleapis.com/LATEST_RELEASE_88.0.4320 Note how the version number varies slightly. I guess that technically it means that Chromium version is unsupported. Anyhow, I've got it resolved now with those two links mentioned above. 👍 |
Great!
Oops! You are correct. My eyes tricked me and I did not notice the slight difference. I'll go ahead and close this ticket for now, but feel free to create a new one if you run into issues. |
Summary
I recently completely uninstalled Google Chrome for reasons explained here.. This has broken my use of webdrivers, so I'm now trying to switch to Chromium instead.
Whereas webdrivers + Google Chrome seems to work out-of-the-box, getting Chromium to work is a bit more complex. I think step-by-step instructions would be useful for me and other developers.
What I've done so far
This installs the latest version of Chromium. At the time of writing that's
89.0.4354.0 (Developer Build) (x86_64)
I use webdrivers (
4.4.1
) with capybara (3.34.0
) like this:This leads to the following error:
There is indeed no Chromedriver available for that version number: https://chromedriver.storage.googleapis.com/index.html
So I followed the instructions and set the latest available version:
This seems to work. But now I have a hardcoded version number in my app that is bound to get outdated at some point. I've also tried setting it to "LATEST_VERSION" but that didn't work.
Suggestion
Before running into this problem I was oblivious to what chromedriver even was. I just knew that "webdrivers" somehow enabled my Rails system tests to work properly.
And while it's always useful to learn about the tools you're using, I think it would be better if that wasn't required. It would be really nice if using Chromium was as easy as it is using Chrome. Without needing to figure out how chromedriver works, how its versioning matches Chrome's, and that newer version of Chromium might not work out of the box.
Therefore, I suggest to have webdrivers automatically pick the available chromedriver version that's closest to the installed Chromium version (perhaps showing a warning if it's not an exact match), and/or add some instructions to the README that briefly explain how to install a supported version of Chromium that doesn't require specifying a version number for chromedriver.
Also see #180
The text was updated successfully, but these errors were encountered: