Skip to main content

Smart Webdriver Manager

PyPI Supported Python Versions

A smart webdriver manager. Inspired by webdriver_manager and chromedriver-binary-auto.

Unlike other managers, this module manages the driver, browser, and data directory independently of the system installed browser.

The manager requires only a specified browser version (i.e. Chromium 117, 118, 120, etc.). It manages the remaining components.

These are then cached for future use in the user-specified or system-default directory. In other words:

for version in [0, 75, 80, 95, 96]: # 0 -> latest
  # auto-fetch and configure all the needed components and run the automation

Supported Driver/Platform

Chromium Firefox
Windows x -
Linux (x86-64) x -
macOS (Apple Silicon) x -

Installation

pip install smart-webdriver-manager

Examples

Basic Usage

import os
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selenium.webdriver.chrome.service import Service
from smart_webdriver_manager import ChromeDriverManager

version = os.getenv('MY_ENVIRONMENTAL_VARIABLE')
cdm = ChromeDriverManager(version=version)

driver_path = cdm.get_driver()
browser_path = cdm.get_browser()
user_data_path = cdm.get_browser_user_data()

options = ChromeOptions()
options.binary_location = browser_path
options.add_argument(f'--user-data-dir={user_data_path}')
service = Service(executable_path=driver_path)
driver = webdriver.Chrome(service=service, options=options)
try:
    driver.get("http://google.com")
finally:
    driver.quit()

The components themselves are modular. You can use the driver or the browser independently. However, both the driver and browser are fetched together. If you only need a driver then other modules may be better suited.

What's really nice is the work required to update automation is now minimal. Just decrement back if the automation doesn't work. No need to install/uninstall browsers when verifying versions.

Multiple Versions

from smart_webdriver_manager import ChromeDriverManager

for version in [117, 118, 120, 0]:  # 0 -> latest
    cdm = ChromeDriverManager(version=version)
    driver_path = cdm.get_driver()
    browser_path = cdm.get_browser()
    # run automation with this version ...

Custom Cache Directory

from smart_webdriver_manager import ChromeDriverManager

cdm = ChromeDriverManager(version=120, base_path='/tmp/my-cache')
driver_path = cdm.get_driver()

Cache Management

from smart_webdriver_manager import ChromeDriverManager

cdm = ChromeDriverManager(version=120)

# Remove cached driver for this version
cdm.remove_driver()

# Remove cached browser for this version
cdm.remove_browser()

# Remove user data directory for this version
cdm.remove_browser_user_data()

# Remove all cached drivers and browsers
cdm.clear_cache()

macOS Notes

When running Chromium on macOS, the browser may trigger a "Do you want to allow this app to find devices on your local network?" popup. To suppress this, add the following Chrome option:

options.add_argument('--disable-features=MediaRouter')

API Reference

ChromeDriverManager(version=None, base_path=None)

Parameter Type Default Description
version int, str or None None Browser version (e.g. 117, '120'). None, 0 or '' = latest
base_path str or None None Cache directory. None = system default

Methods

Method Returns Description
get_driver() str Download/cache chromedriver and return its path
get_browser() str Download/cache Chromium browser and return its path
get_browser_user_data() str Return path to user data directory for this version
remove_driver() None Remove cached driver for the current version
remove_browser() None Remove cached browser for the current version
remove_browser_user_data() None Remove user data directory for the current version
clear_cache() None Remove all cached drivers and browsers

Technical Layout

Some module definitions:

  • Version: main browser version, ie Chrome 95
  • Release: subversion: ie Chrome 95.01.1121
  • Revision: browser-only, snapshots within a release

To clarify how the module works, below is the cache directory illustrated:

  1. For browsers with revisions, we return the latest revision to the browser.
  2. For driver with releases, we return the latest releases to the driver corresponding to the browser.
  3. A user data directory is aligned with the release.

For example if the user requests chromedriver v96, revision 92512 will be returned for the browser and 96.1.85.111 for the driver.

swm/
    browsers/
        chrome/ [linux]
            96.1.85.54/
                929511/
                    chrome-linux/
                        chrome
                        ...
                929512/
                    chrome-linux/
                        chrome
                        ...
                UserData/
                    ...
        chrome/ [macOS]
            125.0.6422.141/
                1287718/
                    chrome-mac/
                        Chromium.app/
                            Contents/MacOS/Chromium
                UserData/
                    ...
    drivers/
        chromedriver/ [windows]
            96.1.85.54/
                chromedriver.exe
            96.1.85.111/
                chromedriver.exe
    browsers.json
    drivers.json

The system default directory for the cache is as follows:

  • Windows: ~/appdata/roaming/swm
  • Linux: ~/.local/share/swm
  • macOS: ~/Library/Application Support/swm

Development

There are two ways to run local tests

pip install -U pip poetry tox
git clone https://github.com/bissli/smart-webdriver-manager.git && cd smart-webdriver-manager
tox
pip install -U pip poetry
git clone https://github.com/bissli/smart-webdriver-manager.git && cd smart-webdriver-manager
poetry install --with test
poetry shell
pytest

Contributing

Active contributions are welcome (collaboration). Please open a PR for features or bug fixes.

Metadata

Release files for smart-webdriver-manager 0.10.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smart-webdriver-manager 0.10.8
File Size Uploaded Provenance Actions
smart_webdriver_manager-0.10.8.tar.gz 16.5 kB With provenance Details for smart_webdriver_manager-0.10.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for smart-webdriver-manager 0.10.8
File Interpreter ABI Platform Actions
smart_webdriver_manager-0.10.8-py3-none-any.whl Python 3 none any Details for smart_webdriver_manager-0.10.8-py3-none-any.whl

Total release size: 34.2 kB

Release files / smart_webdriver_manager-0.10.8.tar.gz

Download URL smart_webdriver_manager-0.10.8.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f316a76f79e3efc544fe7be23594754e22907c2c4ce605c689c0c4c877c8f9c8
BLAKE2b-256 checksum
How to use checksums
092e2c4cb691e319888b7962c13c96953de3c47c375d7fa84e92e4f2f285b623
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / smart_webdriver_manager-0.10.8-py3-none-any.whl

Download URL smart_webdriver_manager-0.10.8-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a35ed0ff8a7671ace1078a399432e4867aef6eaa1f2911bcb30f699194e19eca
BLAKE2b-256 checksum
How to use checksums
36a668990a632107b73d2676f9a314c9456f2cb15e351c4739837a4520e306e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for smart-webdriver-manager 0.10.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for smart_webdriver_manager-0.10.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page