Skip to main content

msedgedriver

Automated Microsoft Edge WebDriver management for Python.

Stop manually checking your Edge browser version and downloading the matching WebDriver. msedgedriver automatically detects your local Microsoft Edge version, fetches the exact matching driver from Microsoft's official servers, caches it under ~/.msedgedriver/, and returns its path so your Selenium scripts can run seamlessly — on Windows, macOS, and Linux.

Features

  • Zero-Config Automation: Auto-detects your Edge version (Windows Registry / macOS plist / Linux binary).
  • Cross-Platform: Windows (win64), macOS Intel (mac64), macOS Apple Silicon (mac64 M1/ARM64), Linux (linux64).
  • Returns Driver Path: install() returns the absolute path to msedgedriver.exe — pass it straight to Selenium's Service().
  • Smart Caching: Downloads only when your browser version changes; subsequent calls are instant.
  • Version Pinning: Pin a specific driver version with install(version="125.0.2535.51").
  • Custom Install Path: Override the cache directory with install(install_path="/my/dir").
  • Quiet Mode: Suppress all output with install(quiet=True).
  • Proper Error Handling: Raises MsEdgeDriverException instead of silently swallowing errors.
  • Logging Support: Uses Python's logging module — integrate with your own log config.

Installation

pip install msedgedriver

Quick Start

import msedgedriver
from selenium import webdriver
from selenium.webdriver.edge.service import Service

# Auto-detects Edge version, downloads driver if needed, returns path
path = msedgedriver.install()

driver = webdriver.Edge(service=Service(path))
driver.get("https://github.com")
print(driver.title)
driver.quit()

Full API Reference

msedgedriver.install(version=None, install_path=None, quiet=False) -> str

Downloads and caches the msedgedriver binary. Returns its absolute path.

# Auto-detect version (most common)
path = msedgedriver.install()

# Pin a specific version
path = msedgedriver.install(version="125.0.2535.51")

# Custom cache directory
path = msedgedriver.install(install_path="C:/my/drivers")

# Silent mode (no log output)
path = msedgedriver.install(quiet=True)

msedgedriver.get_edge_version() -> str

Returns the installed Microsoft Edge version string.

ver = msedgedriver.get_edge_version()
print(ver)  # e.g. "148.0.3967.96"

msedgedriver.get_driver_path(version=None, install_path=None) -> str | None

Returns the path to a cached driver without downloading. Returns None if not cached.

path = msedgedriver.get_driver_path()
if path:
    print(f"Already cached at: {path}")

msedgedriver.cleanup(install_path=None) -> None

Removes all cached driver versions except the currently installed Edge version.

msedgedriver.cleanup()

msedgedriver.MsEdgeDriverException

Exception raised when version detection or download fails.

try:
    path = msedgedriver.install()
except msedgedriver.MsEdgeDriverException as e:
    print(f"Driver setup failed: {e}")

Enable Logging

import logging
logging.basicConfig(level=logging.INFO)

import msedgedriver
msedgedriver.install()
# INFO  msedgedriver: Detected Edge version: 148.0.3967.96
# INFO  msedgedriver: Driver already up-to-date: C:\Users\You\.msedgedriver\148.0.3967.96\msedgedriver.exe

System Requirements

  • Python: 3.8 or newer
  • OS: Windows, macOS, or Linux
  • Browser: Microsoft Edge must be installed

Version Detection by Platform

Platform Method
Windows Windows Registry (HKCU\SOFTWARE\Microsoft\Edge\BLBeacon)
macOS defaults read /Applications/Microsoft Edge.app/Contents/Info.plist
Linux microsoft-edge --version (tries stable, beta, dev channels)

Release files for msedgedriver 0.1.0

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

Source distribution (sdist)

Source distribution for msedgedriver 0.1.0
File Size Uploaded
msedgedriver-0.1.0.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for msedgedriver 0.1.0
File Interpreter ABI Platform
msedgedriver-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / msedgedriver-0.1.0.tar.gz

Download URL msedgedriver-0.1.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
511e3cdf7a1999bc51d05d39ecdc1ea5f18852d23de6ec7ba53c1ec1588b1994
BLAKE2b-256 checksum
How to use checksums
a34f0d27a0921d148989ff7127b13a1b3bca8e10c556e83afbcf7fe9fa117496
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / msedgedriver-0.1.0-py3-none-any.whl

Download URL msedgedriver-0.1.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
745b5eb7165133318008f375fdca07b0904daa9b926a7a1e29bd2a56dc4358c0
BLAKE2b-256 checksum
How to use checksums
a8028e11f89f8f9304e751a6cd7b5c998b9f46f64cb4bc7376559be68b20e612
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

1 release file

0.0.1

1 release file

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