``webdrivermanager``
=======================
Python module to facilitate downloading and deploying `WebDriver <https://www.w3.org/TR/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 and then extract it and place it by copying or symlinking it to the location where Selenium or other tools should be able to find it then.
Installation
------------
This module is available on the Python Package Index (PyPI) and can be installed as follows:
``pip install webdrivermanager``
Dependencies
------------
This module is dependent on the following additional packages:
- `requests <https://pypi.org/project/requests/>`_
- `tqdm <https://pypi.org/project/tqdm/>`_
- `BeautifulSoup4 <https://pypi.org/project/beautifulsoup4/>`_
- `appdirs <https://pypi.org/project/appdirs/>`_
Classes
-------
The following classes are available:
- ``ChromeDriverManager`` for downloading and installing `chromedriver <https://sites.google.com/a/chromium.org/chromedriver/downloads>`_ (for Google Chrome).
- ``GeckoDriverManager`` for downloading and installing `geckodriver <https://github.com/mozilla/geckodriver>`_ (for Mozilla Firefox).
- ``OperaChromiumDriverManager`` for downloading and installing `operadriver <https://github.com/operasoftware/operachromiumdriver>`_ (for Chromium based Opera browsers).
- ``EdgeDriverManager`` for downloading and installing `edgedriver <https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/>`_ (for Microsoft Edge).
- ``EdgeChromiumDriverManager`` for downloading and installing Edge Chromium based webdrivers
- ``IeDriverManager`` for downloading and installing Internet Explorer based webdrivers
Status
------
Currently being developed/tested using Python 2.7.15 and 3.7 on macOS, Windows & Linux
Example module usage
--------------------
Example::
>>> from webdrivermanager import GeckoDriverManager
>>> gdd = GeckoDriverManager()
>>> gdd.download_and_install()
1524kb [00:00, 1631.24kb/s]
('/Users/rasjani/webdriver/geckodriver-v0.20.1-macos/geckodriver', '/Users/rasjani/bin/geckodriver')
>>> gdd.download_and_install("v0.20.0")
1501kb [00:02, 678.92kb/s]
Symlink /Users/rasjani/bin/geckodriver already exists and will be overwritten.
('/Users/rasjani/webdriver/geckodriver-v0.20.0-macos/geckodriver', '/Users/rasjani/bin/geckodriver')
>>> gdd.download_and_install()
Symlink /Users/rasjani/bin/geckodriver already exists and will be overwritten.
('/Users/rasjani/webdriver/geckodriver-v0.20.1-macos/geckodriver', '/Users/rasjani/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)::
> webdrivermanager 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\rasjani\webdriver\chrome\2.38\2.38%2Fchromedriver_win32\chromedriver.exe
Driver copied to: C:\Users\rasjani\bin\chromedriver.exe
Downloading WebDriver for browser: 'firefox'
3031kb [00:01, 2253.64kb/s]
Driver binary downloaded to: C:\Users\rasjani\webdriver\gecko\v0.20.1\geckodriver-v0.20.1-win64\geckodriver.exe
Driver copied to: C:\Users\rasjani\bin\geckodriver.exe
Downloading WebDriver for browser: 'opera'
3548kb [00:02, 1239.02kb/s]
Driver binary downloaded to: C:\Users\rasjani\webdriver\operachromium\v.2.35\operadriver_win64\operadriver_win64\operadriver.exe
Driver copied to: C:\Users\rasjani\bin\operadriver.exe
WARNING: Path 'C:\Users\rasjani\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.
Command line options
--------------------
usage: webdrivermanager [-h] [--downloadpath F] [--linkpath F] [--os OSNAME]
browser [browser ...]
Tool for downloading and installing WebDriver binaries.
positional arguments:
browser Browser to download the corresponding WebDriver
binary. Valid values are: chrome, firefox, gecko,
mozilla, opera, edge. Optionally specify a version
number of the WebDriver binary as follows:
'browser:version' e.g. 'chrome:2.39'. If no version
number is specified, the latest available version of
the WebDriver binary will be downloaded.
optional arguments:
-h, --help show this help message and exit
--downloadpath F, -d F
Where to download the webdriver binaries
--linkpath F, -l F Where to link the webdriver binary to. Set to "AUTO"
if you need some intelligence to decice where to place
the final webdriver binary
--linkpath F, -l F Where to link the webdriver binary to. Set to "AUTO"
if you need some intelligense to decide where to place
the final webdriver binary. If set to "SKIP", no
link/copy done
--os OSNAME, -o OSNAME
Overrides os detection with given os name
Do note that `--downloadpath`/`-d` flag location is used for storing the whole downloaded and then `--linkpath`/`-l` path location is where the final binary is either symlinled or copied to. Linkpath should be the directory you either already have in PATH or you should place there since tools using these webdrivers usually locate the appropriate webdriver binary from PATH environment variable.
If linkpath flag is set to *AUTO*, tool will iterate over your current PATH environment variable and tries to find the first writeable directory within it and place the copy or symlink into it. If linkpath is set to *SKIP*, only download is done, linking/copying is skipped.
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/rasjani/webdrivermanager",
"name": "webdrivermanager",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "webdriver chromedriver geckodriver edgechromiumdriver selenium",
"author": "Jani Mikkonen",
"author_email": "jani.mikkonen@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/3c/75/81b306150423486803c6fd8a28d83fc91b992a089c7059e63c231cdefef1/webdrivermanager-0.10.0.tar.gz",
"platform": "any",
"description": "``webdrivermanager``\n=======================\n\nPython module to facilitate downloading and deploying `WebDriver <https://www.w3.org/TR/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 and then extract it and place it by copying or symlinking it to the location where Selenium or other tools should be able to find it then.\n\n\nInstallation\n------------\n\nThis module is available on the Python Package Index (PyPI) and can be installed as follows:\n\n``pip install webdrivermanager``\n\n\nDependencies\n------------\n\nThis module is dependent on the following additional packages:\n\n- `requests <https://pypi.org/project/requests/>`_\n- `tqdm <https://pypi.org/project/tqdm/>`_\n- `BeautifulSoup4 <https://pypi.org/project/beautifulsoup4/>`_\n- `appdirs <https://pypi.org/project/appdirs/>`_\n\n\nClasses\n-------\n\nThe following classes are available:\n\n- ``ChromeDriverManager`` for downloading and installing `chromedriver <https://sites.google.com/a/chromium.org/chromedriver/downloads>`_ (for Google Chrome).\n- ``GeckoDriverManager`` for downloading and installing `geckodriver <https://github.com/mozilla/geckodriver>`_ (for Mozilla Firefox).\n- ``OperaChromiumDriverManager`` for downloading and installing `operadriver <https://github.com/operasoftware/operachromiumdriver>`_ (for Chromium based Opera browsers).\n- ``EdgeDriverManager`` for downloading and installing `edgedriver <https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/>`_ (for Microsoft Edge).\n- ``EdgeChromiumDriverManager`` for downloading and installing Edge Chromium based webdrivers\n- ``IeDriverManager`` for downloading and installing Internet Explorer based webdrivers\n\n\nStatus\n------\n\nCurrently being developed/tested using Python 2.7.15 and 3.7 on macOS, Windows & Linux\n\n\nExample module usage\n--------------------\n\nExample::\n\n >>> from webdrivermanager import GeckoDriverManager\n >>> gdd = GeckoDriverManager()\n >>> gdd.download_and_install()\n 1524kb [00:00, 1631.24kb/s]\n ('/Users/rasjani/webdriver/geckodriver-v0.20.1-macos/geckodriver', '/Users/rasjani/bin/geckodriver')\n >>> gdd.download_and_install(\"v0.20.0\")\n 1501kb [00:02, 678.92kb/s]\n Symlink /Users/rasjani/bin/geckodriver already exists and will be overwritten.\n ('/Users/rasjani/webdriver/geckodriver-v0.20.0-macos/geckodriver', '/Users/rasjani/bin/geckodriver')\n >>> gdd.download_and_install()\n Symlink /Users/rasjani/bin/geckodriver already exists and will be overwritten.\n ('/Users/rasjani/webdriver/geckodriver-v0.20.1-macos/geckodriver', '/Users/rasjani/bin/geckodriver')\n >>>\n\n\nCommand line tool\n-----------------\n\nThere is a command-line tool that is also available. After installing the package, it can be used as follows (Windows example)::\n\n > webdrivermanager chrome:2.38 firefox opera:v.2.35\n Downloading WebDriver for browser: 'chrome'\n 3300kb [00:00, 11216.38kb/s]\n Driver binary downloaded to: C:\\Users\\rasjani\\webdriver\\chrome\\2.38\\2.38%2Fchromedriver_win32\\chromedriver.exe\n Driver copied to: C:\\Users\\rasjani\\bin\\chromedriver.exe\n\n Downloading WebDriver for browser: 'firefox'\n 3031kb [00:01, 2253.64kb/s]\n Driver binary downloaded to: C:\\Users\\rasjani\\webdriver\\gecko\\v0.20.1\\geckodriver-v0.20.1-win64\\geckodriver.exe\n Driver copied to: C:\\Users\\rasjani\\bin\\geckodriver.exe\n\n Downloading WebDriver for browser: 'opera'\n 3548kb [00:02, 1239.02kb/s]\n Driver binary downloaded to: C:\\Users\\rasjani\\webdriver\\operachromium\\v.2.35\\operadriver_win64\\operadriver_win64\\operadriver.exe\n Driver copied to: C:\\Users\\rasjani\\bin\\operadriver.exe\n\n WARNING: Path 'C:\\Users\\rasjani\\bin' is not in the PATH environment variable.\n\nIn 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.\n\nCommand line options\n--------------------\n\n usage: webdrivermanager [-h] [--downloadpath F] [--linkpath F] [--os OSNAME]\n browser [browser ...]\n\n Tool for downloading and installing WebDriver binaries.\n\n\tpositional arguments:\n\t browser Browser to download the corresponding WebDriver\n\t\t\t\t binary. Valid values are: chrome, firefox, gecko,\n\t\t\t\t mozilla, opera, edge. Optionally specify a version\n\t\t\t\t number of the WebDriver binary as follows:\n\t\t\t\t 'browser:version' e.g. 'chrome:2.39'. If no version\n\t\t\t\t number is specified, the latest available version of\n\t\t\t\t the WebDriver binary will be downloaded.\n\n optional arguments:\n -h, --help show this help message and exit\n --downloadpath F, -d F\n Where to download the webdriver binaries\n --linkpath F, -l F Where to link the webdriver binary to. Set to \"AUTO\"\n if you need some intelligence to decice where to place\n the final webdriver binary\n --linkpath F, -l F Where to link the webdriver binary to. Set to \"AUTO\"\n if you need some intelligense to decide where to place\n the final webdriver binary. If set to \"SKIP\", no\n link/copy done\n --os OSNAME, -o OSNAME\n Overrides os detection with given os name\n\n\nDo note that `--downloadpath`/`-d` flag location is used for storing the whole downloaded and then `--linkpath`/`-l` path location is where the final binary is either symlinled or copied to. Linkpath should be the directory you either already have in PATH or you should place there since tools using these webdrivers usually locate the appropriate webdriver binary from PATH environment variable.\n\nIf linkpath flag is set to *AUTO*, tool will iterate over your current PATH environment variable and tries to find the first writeable directory within it and place the copy or symlink into it. If linkpath is set to *SKIP*, only download is done, linking/copying is skipped.\n\nLicense\n-------\n\nThis is released under an MIT license. See the ``LICENSE`` file in this repository for more information.\n\nConsult the license terms of the providers of the WebDriver downloads prior to downloading / using the WebDrivers.",
"bugtrack_url": null,
"license": "MIT",
"summary": "Module for facilitating download and deploy of WebDriver binaries.",
"version": "0.10.0",
"project_urls": {
"Homepage": "https://github.com/rasjani/webdrivermanager"
},
"split_keywords": [
"webdriver",
"chromedriver",
"geckodriver",
"edgechromiumdriver",
"selenium"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3c7581b306150423486803c6fd8a28d83fc91b992a089c7059e63c231cdefef1",
"md5": "2b13b591c6004b0511db66538c892c8d",
"sha256": "c313a71340f0bb7bfef8b03763a0b1b323473e1cc3945a86f3230e78529af067"
},
"downloads": -1,
"filename": "webdrivermanager-0.10.0.tar.gz",
"has_sig": false,
"md5_digest": "2b13b591c6004b0511db66538c892c8d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 33916,
"upload_time": "2021-02-22T11:53:49",
"upload_time_iso_8601": "2021-02-22T11:53:49.911971Z",
"url": "https://files.pythonhosted.org/packages/3c/75/81b306150423486803c6fd8a28d83fc91b992a089c7059e63c231cdefef1/webdrivermanager-0.10.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2021-02-22 11:53:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rasjani",
"github_project": "webdrivermanager",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"tox": true,
"lcname": "webdrivermanager"
}