Edge WebDriver on Windows
Overviewโ
On Windows, Dioxus applications use Microsoft Edge WebView2, which requires msedgedriver.exe for WebDriver automation when using the 'external' driver provider. The dioxus-service automatically handles Edge WebDriver version matching to prevent version mismatch errors.
This document only applies to the 'external' driver provider on Windows. The 'embedded' provider (recommended) has no Edge WebDriver dependency.
The Problemโ
Tests using driverProvider: 'external' fail on Windows when the Edge browser version doesn't match the installed msedgedriver version:
Error: This version of Microsoft Edge WebDriver only supports Microsoft Edge version 144.
Current browser version is 143.0.3650.139
The Solutionโ
When driverProvider: 'external' and autoDownloadEdgeDriver: true, the dioxus-service automatically:
- Detects your Edge browser (WebView2) version
- Checks if a matching msedgedriver.exe exists
- Downloads the correct version if needed
- Configures PATH to use the downloaded driver
Configurationโ
Auto-Download (Recommended)โ
By default, auto-download is enabled for the 'external' provider:
services: [
['@wdio/dioxus-service', {
driverProvider: 'external',
appBinaryPath: './target/debug/my_app.exe',
// autoDownloadEdgeDriver: true (default)
}]
]
Manual Managementโ
Disable auto-download if you prefer to manage drivers yourself:
services: [
['@wdio/dioxus-service', {
driverProvider: 'external',
appBinaryPath: './target/debug/my_app.exe',
autoDownloadEdgeDriver: false,
}]
]
With auto-download disabled, you must ensure msedgedriver matches your Edge version manually.
How It Worksโ
1. Version Detectionโ
The service detects the WebView2/Edge version from:
- Windows Registry:
HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}
2. Driver Checkโ
Checks if msedgedriver.exe in PATH matches the detected Edge version (major version comparison).
3. Download & Installโ
If a mismatch is detected:
- Downloads msedgedriver from
https://msedgedriver.azureedge.net/{version}/ - Caches in temp directory:
%TEMP%\msedgedriver\{majorVersion}\ - Adds to process PATH for test execution
Troubleshootingโ
"Could not detect Edge version"โ
Cause: Edge not installed or registry keys missing.
Solution: Install Microsoft Edge from https://www.microsoft.com/edge
"Failed to download msedgedriver"โ
Causes:
- Network/proxy issues
- Microsoft's CDN temporarily unavailable
Solutions:
- Check internet connection and proxy settings
- Retry โ CDN may be temporarily down
- Download manually from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
- Place
msedgedriver.exein PATH
"Version mismatch" even after downloadโ
Cause: Another msedgedriver.exe earlier in PATH is being used.
Solution: Check PATH order:
where msedgedriver.exe
Ensure the correct version appears first.
CI/GitHub Actions Issuesโ
GitHub Actions runners may have outdated Edge. Update if needed:
- name: Update Edge (if needed)
if: runner.os == 'Windows'
run: choco upgrade microsoft-edge -y
- name: Run tests
run: npm run test:e2e
Manual Driver Managementโ
If you disable auto-download:
Check Edge Versionโ
reg query "HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}" /v pv
Download Matching Driverโ
- Visit https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
- Download the version matching your Edge major version
- Extract
msedgedriver.exe - Add to PATH or place in project directory
Verify Installationโ
msedgedriver.exe --version
Cache Locationโ
Downloaded drivers are cached at:
%TEMP%\msedgedriver\{majorVersion}\msedgedriver.exe
Example: C:\Users\YourName\AppData\Local\Temp\msedgedriver\143\msedgedriver.exe
Platform Notesโ
- Windows: Edge driver management runs when
driverProvider: 'external' - Linux:
'external'provider is blocked in v1 โ use'embedded' - macOS:
'external'provider is not supported โ use'embedded'
Recommendationโ
Use driverProvider: 'embedded' for the simplest Windows setup โ it works on all platforms without any external driver or Edge WebDriver management.
See Alsoโ
- Platform Support for the full provider matrix
- Configuration for
autoDownloadEdgeDriverand related options - Troubleshooting for common issues