# Edge WebDriver on Windows

## Overview[​](#overview "Direct link to 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[​](#the-problem "Direct link to 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[​](#the-solution "Direct link to The Solution")

When `driverProvider: 'external'` and `autoDownloadEdgeDriver: true`, the dioxus-service automatically:

1. **Detects** your Edge browser (WebView2) version
2. **Checks** if a matching msedgedriver.exe exists
3. **Downloads** the correct version if needed
4. **Configures** PATH to use the downloaded driver

## Configuration[​](#configuration "Direct link to Configuration")

### Auto-Download (Recommended)[​](#auto-download-recommended "Direct link to 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[​](#manual-management "Direct link to 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[​](#how-it-works "Direct link to How It Works")

### 1. Version Detection[​](#1-version-detection "Direct link to 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[​](#2-driver-check "Direct link to 2. Driver Check")

Checks if msedgedriver.exe in PATH matches the detected Edge version (major version comparison).

### 3. Download & Install[​](#3-download--install "Direct link to 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[​](#troubleshooting "Direct link to Troubleshooting")

### "Could not detect Edge version"[​](#could-not-detect-edge-version "Direct link to \"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"[​](#failed-to-download-msedgedriver "Direct link to \"Failed to download msedgedriver\"")

**Causes:**

* Network/proxy issues
* Microsoft's CDN temporarily unavailable

**Solutions:**

1. Check internet connection and proxy settings
2. Retry — CDN may be temporarily down
3. Download manually from <https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/>
4. Place `msedgedriver.exe` in PATH

### "Version mismatch" even after download[​](#version-mismatch-even-after-download "Direct link to \"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[​](#cigithub-actions-issues "Direct link to 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[​](#manual-driver-management "Direct link to Manual Driver Management")

If you disable auto-download:

### Check Edge Version[​](#check-edge-version "Direct link to Check Edge Version")

```
reg query "HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}" /v pv
```

### Download Matching Driver[​](#download-matching-driver "Direct link to Download Matching Driver")

1. Visit <https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/>
2. Download the version matching your Edge major version
3. Extract `msedgedriver.exe`
4. Add to PATH or place in project directory

### Verify Installation[​](#verify-installation "Direct link to Verify Installation")

```
msedgedriver.exe --version
```

## Cache Location[​](#cache-location "Direct link to 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[​](#platform-notes "Direct link to 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[​](#recommendation "Direct link to Recommendation")

Use `driverProvider: 'embedded'` for the simplest Windows setup — it works on all platforms without any external driver or Edge WebDriver management.

## See Also[​](#see-also "Direct link to See Also")

* [Platform Support](/docs/desktop-testing/dioxus/platform-support.md) for the full provider matrix
* [Configuration](/docs/desktop-testing/dioxus/configuration.md) for `autoDownloadEdgeDriver` and related options
* [Troubleshooting](/docs/desktop-testing/dioxus/troubleshooting.md) for common issues
