-
Notifications
You must be signed in to change notification settings - Fork 81
Allow setting an environment variable to skip installation, for systems on which a compatible chromedriver is already installed #77
Comments
@mkllnk Thanks for asking this question. I'm a little confused, can you help me understand why you're using the gem if you'd prefer it to be a no-op? Are you using a shared Gemfile across a variety of system configurations, or is there some other reason? |
Yes, a variety of systems. We have a diverse team with volunteer contributions from all over the world. Chromedriver-helper is extremely convenient for most contributors because they don't have to install chromedriver themselves. But in some environments it's not that useful. The last example was on Semaphore CI. It provides chrome and chromedriver and they work. Using chromedriver-helper can lead to versions that don't work together. So it's only one project, but the Gemfile is used in many different environments (various dev setups, CI, staging, production). |
@mkllnk Thanks for the additional context, I understand more completely now. I'm open to working with you or someone else on a PR along these lines, but would be more inclined to implement something simpler like looking for an environment variable that signals a desire to not install I'm asking because I'd like to find the simplest solution to your problem, and I fear that a simple search for a |
Yes, that sounds very sensible and would be sufficient for my needs. My team was also discussing an environment variable to define the chromedriver version. We can implement that ourselves with Another idea was to support Looking at #78, the possibility to deactivate chromedriver-helper or specify a version for chromedriver would enable a third-party script to choose the right version. I could load a script in my bash-rc to check for chromedriver and the installed chrome version. It can then set the right environment variables to either keep the system chromedriver, install a specific version or the latest. I agree that version management should not be in the chromedriver-helper. It can be in a script or another gem. And the proposed no-op switch would help with that. I appreciate your design thinking. 👍 |
OK - going to change the title on this to reflect the solution on which we're converging. |
👍 Great! Do you think you will have time to do this? How much work would it be? |
Yeah, I'm hoping to get to this in the next few days. |
I've started using the following snippet to detect and use whatever `which chromedriver`.chomp.tap do |driver|
Selenium::WebDriver::Chrome.driver_path = driver if $?.success?
end |
@cbandy Can you explain your solution a bit more? I'm not clear where you add your snippet. Before or after you register chrome as webdriver? And I think in my case |
I did it before, but I suspect it might not matter.
|
I'm going to close this issue, as the gem is being deprecated in favor of webdrivers, see #83. |
We just had some failing builds on Semaphore CI because chromedriver-helper is installing the latest chromedriver version while Semaphore is not providing the latest Chrome. The workaround is to either install the latest Chrome or lock chromedriver to a compatible version (howto). But that will lead to an outdated chromedriver version one day. Some people also prefer to use their system's chromedriver instead of installing a new one through chromedriver-helper.
How difficult would it be to not install a new chromedriver if the system provides one already? It's how I expected this gem to work actually.
The text was updated successfully, but these errors were encountered: