Automated Microsoft Edge WebDriver manager for Selenium
Project description
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 tomsedgedriver.exe— pass it straight to Selenium'sService(). - 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
MsEdgeDriverExceptioninstead of silently swallowing errors. - Logging Support: Uses Python's
loggingmodule — 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) |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file msedgedriver-0.1.0.tar.gz.
File metadata
- Download URL: msedgedriver-0.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
511e3cdf7a1999bc51d05d39ecdc1ea5f18852d23de6ec7ba53c1ec1588b1994
|
|
| MD5 |
4f785d1af32d314623d2ff8b9965090a
|
|
| BLAKE2b-256 |
a34f0d27a0921d148989ff7127b13a1b3bca8e10c556e83afbcf7fe9fa117496
|
File details
Details for the file msedgedriver-0.1.0-py3-none-any.whl.
File metadata
- Download URL: msedgedriver-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
745b5eb7165133318008f375fdca07b0904daa9b926a7a1e29bd2a56dc4358c0
|
|
| MD5 |
354a7e5e4cdb01d24b183b553f727dee
|
|
| BLAKE2b-256 |
a8028e11f89f8f9304e751a6cd7b5c998b9f46f64cb4bc7376559be68b20e612
|