Skip to main content

Module for facilitating download and deploy of WebDriver binaries.

Project description

Python module to facilitate downloading and deploying WebDriver binaries. The classes in this module can be used to automatically search for and download the latest version (or a specific version) of a WebDriver binary (will download to $HOME/webdriver or /usr/local/webdriver if run with sudo), extract the binary from the downloaded archive and create a symlink in either /usr/local/bin (if run with sudo) or $HOME/bin.

Installation

This module is available on the Python Package Index (PyPI) and can be installed as follows:

pip install webdriverdownloader

Dependencies

This module is dependent on the following additional packages:

Classes

The following classes are available:

  • ChromeDriverDownloader for downloading and installing chromedriver (for Google Chrome).

  • GeckoDriverDownloader for downloading and installing geckodriver (for Mozilla Firefox).

  • OperaChromiumDriverDownloader for downloading and installing operadriver (for Chromium based Opera browsers).

Status

Currently being developed/tested using Python 2.7.15 and 3.6.5 on macOS and Windows 10.

Example module usage

Example:

>>> from webdriverdownloader import GeckoDriverDownloader
>>> gdd = GeckoDriverDownloader()
>>> gdd.download_and_install()
1524kb [00:00, 1631.24kb/s]
('/Users/lsaguisag/webdriver/geckodriver-v0.20.1-macos/geckodriver', '/Users/lsaguisag/bin/geckodriver')
>>> gdd.download_and_install("v0.20.0")
1501kb [00:02, 678.92kb/s]
Symlink /Users/lsaguisag/bin/geckodriver already exists and will be overwritten.
('/Users/lsaguisag/webdriver/geckodriver-v0.20.0-macos/geckodriver', '/Users/lsaguisag/bin/geckodriver')
>>> gdd.download_and_install()
Symlink /Users/lsaguisag/bin/geckodriver already exists and will be overwritten.
('/Users/lsaguisag/webdriver/geckodriver-v0.20.1-macos/geckodriver', '/Users/lsaguisag/bin/geckodriver')
>>>

Command line tool

There is a command-line tool that is also available. After installing the package, it can be used as follows (Windows example):

> webdriverdownloader chrome:2.38 firefox opera:v.2.35
Downloading WebDriver for browser: 'chrome'
3300kb [00:00, 11216.38kb/s]
Driver binary downloaded to: C:\Users\lsaguisag\webdriver\chrome\2.38\2.38%2Fchromedriver_win32\chromedriver.exe
Driver copied to: C:\Users\lsaguisag\bin\chromedriver.exe

Downloading WebDriver for browser: 'firefox'
3031kb [00:01, 2253.64kb/s]
Driver binary downloaded to: C:\Users\lsaguisag\webdriver\gecko\v0.20.1\geckodriver-v0.20.1-win64\geckodriver.exe
Driver copied to: C:\Users\lsaguisag\bin\geckodriver.exe

Downloading WebDriver for browser: 'opera'
3548kb [00:02, 1239.02kb/s]
Driver binary downloaded to: C:\Users\lsaguisag\webdriver\operachromium\v.2.35\operadriver_win64\operadriver_win64\operadriver.exe
Driver copied to: C:\Users\lsaguisag\bin\operadriver.exe

WARNING: Path 'C:\Users\lsaguisag\bin' is not in the PATH environment variable.

In the above example, a version was specified for Chrome and Opera while no version was specified for Firefox so the latest version of geckodriver was implicitly downloaded.

TODOs

  • Test on Linux

License

This is released under an MIT license. See the LICENSE file in this repository for more information.

Consult the license terms of the providers of the WebDriver downloads prior to downloading / using the WebDrivers.

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

webdriverdownloader-0.1.dev3.tar.gz (8.3 kB view details)

Uploaded Source

Built Distributions

webdriverdownloader-0.1.dev3-py3.7.egg (15.3 kB view details)

Uploaded Source

webdriverdownloader-0.1.dev3-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file webdriverdownloader-0.1.dev3.tar.gz.

File metadata

  • Download URL: webdriverdownloader-0.1.dev3.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for webdriverdownloader-0.1.dev3.tar.gz
Algorithm Hash digest
SHA256 294fd2028077a1f9839f515708f78bb8884e17498b41c902e0d1e20ec1885478
MD5 d59fd84c73e90e83d52dc1800489a898
BLAKE2b-256 bc36dd835dbdb39ae4fba54965a2f5443887f04446dcf03451309372173273e6

See more details on using hashes here.

File details

Details for the file webdriverdownloader-0.1.dev3-py3.7.egg.

File metadata

  • Download URL: webdriverdownloader-0.1.dev3-py3.7.egg
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for webdriverdownloader-0.1.dev3-py3.7.egg
Algorithm Hash digest
SHA256 e04ee6f54018b448abfe9ead1c77cecd37d1b36bb032fd3373ef296a1f876a32
MD5 077755ec6efdf45667b8ee40afe3ff76
BLAKE2b-256 e17ca993f762dfeb38f55727c255bef206b6e2dfdab408105936de4be511166b

See more details on using hashes here.

File details

Details for the file webdriverdownloader-0.1.dev3-py3-none-any.whl.

File metadata

  • Download URL: webdriverdownloader-0.1.dev3-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for webdriverdownloader-0.1.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 46d37a704cbb1f38005b38fdadb5debf8f514fa0c8f4675f7a6cca92fcaaa501
MD5 dee2d25b8fc2d1232bb50f2a157221c5
BLAKE2b-256 3e0b00e8540ca4ad15fbf843ccdd1f28f2d047cdedf7629044bb9d98525b09f3

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