Comments (11)
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).
from chromedriver-helper.
I've started using the following snippet to detect and use whatever chromedriver
executable is already installed. When it is not installed, chromedriver-helper
remains the default/automatic selection.
`which chromedriver`.chomp.tap do |driver|
Selenium::WebDriver::Chrome.driver_path = driver if $?.success?
end
from chromedriver-helper.
@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?
from chromedriver-helper.
@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 chromedriver
, like CHROMEDRIVER_HELPER_NO_OP
, which could be set in your CI system. Would this be sufficient for your needs?
I'm asking because I'd like to find the simplest solution to your problem, and I fear that a simple search for a chromedriver
executable in $PATH
(or similar) would break some people's use cases. My experience has been that you and I cannot imagine all the wacky stuff that people do to configure their development environments, and so a declarative solution (like setting an env var) is superior to attempting to discern intent from an examination of the filesystem.
from chromedriver-helper.
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 Chromedriver.set_version
.
Another idea was to support Chromedriver.set_version = "system"
to deactivate the installation. I'm not sure what is easier.
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. 👍
from chromedriver-helper.
OK - going to change the title on this to reflect the solution on which we're converging.
from chromedriver-helper.
👍 Great! Do you think you will have time to do this? How much work would it be?
from chromedriver-helper.
Yeah, I'm hoping to get to this in the next few days.
from chromedriver-helper.
@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 which chromedriver
would always point to "~/.rbenv/shims/chromedriver". That doesn't reveal if the system has a chromedriver binary installed or not.
from chromedriver-helper.
Before or after you register chrome as webdriver?
I did it before, but I suspect it might not matter.
chromedriver
executable in rbenv is from this gem prior to version 2.0. Since then, the executable created by this gem is chromedriver-helper
.
from chromedriver-helper.
I'm going to close this issue, as the gem is being deprecated in favor of webdrivers, see #83.
from chromedriver-helper.
Related Issues (20)
- unknown error: call function result missing 'value' for Selenium Send Keys even after chromedriver upgrade HOT 1
- Chromedriver picks up wrong version HOT 13
- chromedriver-helper breaks projects not using it HOT 20
- No options to set log log-level and log-path HOT 6
- Using with Rails: "uninitialized constant Selenium" HOT 5
- Use LATEST_RELEASE file rather than guessing HOT 8
- Chromedriver helper downloading weird chromedriver version number HOT 2
- NameError: uninitialized constant Chromedriver in rails & rspec config HOT 5
- Mention "require" in README? HOT 3
- certificate verify failed (self signed certificate in certificate chain) (OpenSSL::SSL::SSLError) HOT 9
- Not executable: chromedriver-helper HOT 1
- No output with 'which chromedriver' after installing 2.1.0 HOT 3
- Not working in rspec (calling in rails_helper.rb) HOT 1
- Can't get this working in trivial case HOT 7
- Use a compatible version of chromedriver HOT 8
- Version selection with LATEST_RELEASE is deprecated HOT 17
- Seeking new maintainer HOT 16
- Doc question HOT 1
- NOTICE: Ending support for this gem HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chromedriver-helper.