Git Product home page Git Product logo

Comments (11)

mkllnk avatar mkllnk commented on September 23, 2024 1

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.

cbandy avatar cbandy commented on September 23, 2024 1

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.

flavorjones avatar flavorjones commented on September 23, 2024

@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.

flavorjones avatar flavorjones commented on September 23, 2024

@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.

mkllnk avatar mkllnk commented on September 23, 2024

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.

flavorjones avatar flavorjones commented on September 23, 2024

OK - going to change the title on this to reflect the solution on which we're converging.

from chromedriver-helper.

mkllnk avatar mkllnk commented on September 23, 2024

👍 Great! Do you think you will have time to do this? How much work would it be?

from chromedriver-helper.

flavorjones avatar flavorjones commented on September 23, 2024

Yeah, I'm hoping to get to this in the next few days.

from chromedriver-helper.

mkllnk avatar mkllnk commented on September 23, 2024

@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.

cbandy avatar cbandy commented on September 23, 2024

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.

flavorjones avatar flavorjones commented on September 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.