Currently I am working on a selenium webdriver project using python. My tests run only in chrome (when the executable file is present in the project). Is there an updated alternative to install the chromedriver via package?

My problem is that my code is in github, so if my colleague wants to test locally, the executable chromedriver file that works for me may not work for him. How can solve that?

I'm trying to use chrome_installer, but even so i'm not able to install chromedriver. See my tox.ini here take.ms/Lq37g and see my requirements.txt here take.ms/BZONn then after run tox, the chromedriver is not installed

  • Please, specify better your problem: - The installation is failing only your friend's machine? Could you put a screenshot of the error? – João Farias Apr 15 '17 at 18:40
  • also try focusing on what you want to achieve and less on what the problem is, people might suggest better solutions – Rsf Dec 12 '17 at 9:10

Without considering the reply to my comment, I can raise some possible problems:

  • Your checksum is different from the indicated in Pypi site (See the "Installation With PIP" section);

  • The package build is failing on Travis;

  • The Chromedriver version 2.10 is meant to run against Chrome version 33-36.

In general you can package chromedriver a few different ways:

  1. Sounds like you are already including the executable in your GitHub repo and then your code knows where to launch the driver. This is a good idea, but you'll just want to make sure to keep the driver / browsers in sync.

  2. If you want to use older browsers / drivers (which it sounds like is your problem now) for Standalone Chrome and each person who runs that container will be paired with the right browser + driver. You'll have to update your code to point to this container to run the tests and they will run headlessly.

  3. Through a package manager like Homebrew (package manager for macOS) brew install chromedriver. The problem here is the same problem for #1 in that you'll need to keep the driver + browser in sync.

Of these options, the surefire way to keep the browser + driver stable / the same is to do the docker container. Although that means you can allow both to grow out of date. Docker + headless might also introduce some weirdness if you've never run the tests like that before.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.