Skip to main content

A tool to download and install ChromeDriver.

Project description

Get ChromeDriver

PyPI - Python Version PyPI PyPI - Status PyPI - License

A tool to download and install ChromeDriver. Automatically download a ChromeDriver version for the current installed Chrome version. Or you can choose to download the beta version (if one is currently available), the stable version or another specific version. You can use this tool as a package import or as a command-line application.

This Python package runs through a Jenkins test pipeline every hour to ensure proper functionality.

Install

To install:

pip install get-chrome-driver

To upgrade:

pip install get-chrome-driver --upgrade

Usage

Install and use ChromeDriver with Selenium

import time
from get_chrome_driver import GetChromeDriver
from selenium import webdriver

# Install the driver:
# Downloads ChromeDriver for the installed Chrome version on the machine
# Adds the downloaded ChromeDriver to path
get_driver = GetChromeDriver()
get_driver.install()

# Use the installed ChromeDriver with Selenium
driver = webdriver.Chrome()
driver.get("https://google.com")
time.sleep(3)
driver.quit()

For downloading only

from get_chrome_driver import GetChromeDriver

get_driver = GetChromeDriver()

# Print the stable version
print(get_driver.stable_version())

# Print the stable version download link
print(get_driver.stable_version_url())

# Print the download link of a specific version
print(get_driver.version_url('84.0.4147.30'))

# Auto download ChromeDriver for the installed Chrome version
# Optional: use output_path= to specify where to download the driver
# Optional: use extract=True to extract the file
get_driver.auto_download(extract=True)

# Download the stable driver version
# Optional: use output_path= to specify where to download the driver
# Optional: use extract=True to extract the zip file
get_driver.download_stable_version(extract=True)

# Download a specific driver version
# Optional: use output_path= to specify where to download the driver
# Optional: use extract=True to extract the file
get_driver.download_version('84.0.4147.30', extract=True)

Command-line

Print the stable version url of all platforms:

get-chrome-driver --latest-urls

Print the stable version:

get-chrome-driver --stable-version

Print the stable version url:

get-chrome-driver --stable-url

Auto download ChromeDriver for the current installed Chrome version and extract the file:

get-chrome-driver --auto-download --extract

Download the stable version and extract the file:

get-chrome-driver --download-stable --extract

Download a specific version and extract the file:

get-chrome-driver --download-version 84.0.4147.30 --extract

The downloaded driver can be found at:

<current directory>/<chromedriver>/<version>/<bin>/<chromedriver>

Note: Beta version related options and functions will only work if one is currently available.

Options

--help                      Show help.

--beta-version              Print the beta version.

--stable-version            Print the stable version.

--latest-urls               Print the beta and stable version urls for all platforms.

--version-url               Print the url of a version.

--beta-url                  Print the beta version url.

--stable-url                Print the stable version url.

--auto-download             Download a ChromeDriver version for the installed Chrome Version.

--download-beta             Download the beta version.

--download-stable           Download the stable version.

--download-version          Download a specific version.

--extract                   Extract the compressed driver file.

--version                   App version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

get-chrome-driver-1.3.10.tar.gz (10.9 kB view details)

Uploaded Source

File details

Details for the file get-chrome-driver-1.3.10.tar.gz.

File metadata

  • Download URL: get-chrome-driver-1.3.10.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for get-chrome-driver-1.3.10.tar.gz
Algorithm Hash digest
SHA256 ed8b29e122566307890ffe9413e5d16ed8141a79ecfd84540338695ae17bff00
MD5 0be64e0e74484f816a7ef744c3ba24c7
BLAKE2b-256 7c0bdc43e6b83f7c025bc7f412623659070e4cf3db11d89510d6e6d3ccec248a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page