Downloads and installs the chromedriver binary version 97.0.4692.36 for automated testing of webapps. The installer supports Linux, MacOS and Windows operating systems.
Alternatively the package chromedriver-binary-auto can be used to automatically detect the latest chromedriver version required for the installed Chrome/Chromium browser.
pip install chromedriver-binary
pip install git+https://github.com/danielkaiser/python-chromedriver-binary.git
Please make sure to install Chrome or Chromium first and add the browser to the binary search path.
pip install chromedriver-binary-auto
To redetect the required version and install the newest suitable chromedriver after the first installation simply reinstall the package using
pip install --upgrade --force-reinstall chromedriver-binary-auto
pip install git+https://github.com/danielkaiser/python-chromedriver-binary.git@chromedriver-binary-auto
To use chromedriver just import chromedriver_binary
. This will add the executable to your PATH so it will be found. You can also get the absolute filename of the binary with chromedriver_binary.chromedriver_filename
.
from selenium import webdriver
import chromedriver_binary # Adds chromedriver binary to path
driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title
This package installs a small shell script chromedriver-path
to easily set and export the PATH variable:
$ export PATH=$PATH:`chromedriver-path`