Skip to main content

Library provides the way to automatically manage drivers for different browsers

Project description

Webdriver Manager for Python

Build Status PyPI

The main idea is to simplify management of binary drivers for different browsers.

For now support:

  • ChromeDriver

  • GeckoDriver

  • IEDriver

  • OperaDriver

  • EdgeChromiumDriver

Before: You should download binary chromedriver, unzip it somewhere in you PC and set path to this driver like this:



It’s boring!!! Moreover every time the new version of driver released, you should go and repeat all steps again and again.

With webdriver manager, you just need to do two simple steps:

Install manager:

pip install webdriver_manager

Use with Chrome:

from selenium import webdriver
from import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager().install())

Use with Chromium:

from selenium import webdriver
from import ChromeDriverManager
from webdriver_manager.utils import ChromeType

driver = webdriver.Chrome(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install())

Use with FireFox:

from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager

driver = webdriver.Firefox(executable_path=GeckoDriverManager().install())

Use with IE

from selenium import webdriver
from import IEDriverManager

driver = webdriver.Ie(IEDriverManager().install())

Use with Edge

from selenium import webdriver
from import EdgeChromiumDriverManager

driver = webdriver.Edge(EdgeChromiumDriverManager().install())

Use with Opera

from selenium import webdriver
from webdriver_manager.opera import OperaDriverManager

driver = webdriver.Opera(executable_path=OperaDriverManager().install()

If the Opera browser is installed in a location other than C:/Program Files or C:/Program Files (x86) on windows and /usr/bin/opera for all unix variants and mac, then use the below code,

from selenium import webdriver
from webdriver_manager.opera import OperaDriverManager

options = webdriver.ChromeOptions()
options.binary_location = "C:\\Users\\USERNAME\\FOLDERLOCATION\\Opera\\VERSION\\opera.exe"
driver = webdriver.Opera(executable_path=OperaDriverManager().install(), options=options)


If you face error related to github credentials, you need to place github token: (*)


export GH_TOKEN = "asdasdasdasd"

(*) access_token required to work with Github API more info

There is also possibility to set same variables via ENV VARIABLES.

To silent webdriver_manager logs and remove them from console, initialize env variable WDM_LOG_LEVEL with '0' value before your selenium tests:

import os

os.environ['WDM_LOG_LEVEL'] = '0'

or via constructor:

ChromeDriverManager("2.26", log_level=0).install()

This will make your test automation more elegant and robust!

Project details

Download files

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

Files for webdriver-manager, version 2.5.2
Filename, size File type Python version Upload date Hashes
Filename, size webdriver_manager-2.5.2-py2.py3-none-any.whl (15.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page