Manage chromedriver and gecko versions via npm packages
Improvement
Instead of having to manually bump versions of chromedriver and geckodriver, we should use the https://www.npmjs.com/package/chromedriver and https://www.npmjs.com/package/geckodriver packages and require a version >= Latest as dev dependencies.
Hi @patthiel there are two subjects maybe here:
- having to manually bump versions of drivers in selenium-standalone (said differently: selenium-standalone freezes the drivers)
- using npm packages as dependencies for those drivers
I am down for 2 if it simplifies the implementation part while still providing the ability to select a particular driver version.
As for 1 I am not sure how this would be better. Let's imagine this:
- super_app is my app
- super_app/node_modules/selenium-standalone is vX and uses the drivers npm packages you gave
- there's a new driver for chrome
- at some point npm_package_chromedriver is updated with the new version
- how does the user is notified of the new version of chromedriver? Since we do not release selenium-standalone anymore neither greenkeeper or npm-check-packages or https://github.com/dylang/npm-check will say "There's a new version of selenium-standalone, install it"
What do you think?
I think @patthiel is absolutely right. This hosts are evil for me.
I don't want to open any external connections (including github) on my servers to download these files. It should be published with npm package or used as optional dependencies (optionalDependencies).
A service failed in the 'onPrepare' hook
Error: Could not request headers from https://github.com/mozilla/geckodriver/releases/download/v0.10.0/geckodriver-v0.10.0-mac.tar.gz:
I see similar errors very ofter.
https://github.com/mozilla/geckodriver/releases/download/v0.10.0/geckodriver-v0.10.0-mac.tar.gz — not found ?? https://github.com/mozilla/geckodriver/releases/download/v0.10.0/geckodriver-v0.10.0-macos.tar.gz - found
@monolithed It's a design decision indeed. What you are proposing is a different issue. You are proposing that we distribute selenium-standalone with all the drivers pre-downloaded inside the npm package. You still have to open an external connection to npm, I am wondering why you would not want to open one for github or googlestorage?
selenium-standalone was designed with developer tooling in mind. Thus going with the road of a package containing all drivers for all platforms would lead to issues like "stop downloading all drivers since I am on Windows, not osx".
If you are worried about opening connections on your production servers I advise you to ship a prebuilt folder with everything you need on your server.
You still have to open an external connection to npm
In my case, we use our private npm registry. All packages (with their recursive dependencies) are added in our registry before using. And with this package we have no any guarantee to start testing at all. In my country GitHub was blocked several times.
@vvo via https://github.com/vvo/selenium-standalone/issues/205#issuecomment-241659790
I am down for 2 if it simplifies the implementation part while still providing the ability to select a particular driver version.
Looking at those two modules, I don't immediately see the ability for them to install a specific version. That also would make the workflows for ChromeDriver and GeckoDriver different from IEDriver.
@monolithed via https://github.com/vvo/selenium-standalone/issues/205#issuecomment-241724868
This hosts are evil for me. I don't want to open any external connections (including github) on my servers to download these files.
Are you able to use the drivers.chrome.baseURL option to point to your own internal server that hosts the specific builds that you have vetted and want to use?
An alternative idea:
There appears to be a way to get the latest release info for ChromeDriver and GeckoDriver.
- https://chromedriver.storage.googleapis.com/LATEST_RELEASE
- https://api.github.com/repos/mozilla/geckodriver/releases/latest
IEDriver doesn't seem to have the same, which is a bummer.
We could potentially use those above URLs to find what the latest version string and/or binary files that we would download if drivers.*.version === 'latest'.
@vvo I think the alternative proposed by @stephenash would be a good solve. My suggestion was brought on because (as you know), presently, in order for people to get a new version of chromedriver/geckodriver they have to manually bump the version and run selenium-standalone install or rely on this project to release a new version to be notified. The former of the two is problematic with large teams and/or continuous integration setups.
My thought is that the general selenium-standalone install command should always install the latest drivers regardless of which version you have of this selenium-standalone package.
Are you able to use the drivers.chrome.baseURL option to point to your own internal server that hosts the specific builds that you have vetted and want to use?
@stephenash, not so comfortable to me, but I think it possible after some fixes in wdio-selenium-standalone-service.
related: #209
My thought is that the general selenium-standalone install command should always install the latest drivers regardless of which version you have of this selenium-standalone package.
I am in for this and will accept PRS solving this (this is a different issue than the current issue subject)
I know this is an old issue but it seems relevant to several pending PR's (specifically #347 and #339 ). After reading the downloads section on ChromeDriver's website it seems like the project only supports a small specific set of releases for Chrome. Personally this has come up several times for my team when a new version of Chrome is incompatible with an old Chromedriver version. While we can always download, install, and use a specific version that seems to be a patch and not the best way forward. Is this still the agreed upon solution? If so I can start working on a PR.
@RMcNeely this issue stopped being relevant to my team because we created a config file for version control like in this example and created a npm script to run selenium-standalone install and start from those configs. We pretty much control the selenium and driver versions installed from there and care much less about the version of this npm package installed now.
It however remains a problem that the default install drivers for this project have to continually be manually updated by contributors to this project. I haven't had a look at solving this beyond my initial suggestion. I'm happy to review any PR's though! Hope this helps
See https://github.com/vvo/selenium-standalone/issues/468