Skip to content

Commit ad39944

Browse files
committed
ci: match EdgeDriver to WebView2 runtime, not Edge browser
Tauri apps use the WebView2 runtime, which can be a different version than the Edge browser on the same machine. Read the WebView2 runtime version from the registry and download the matching EdgeDriver. Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
1 parent 74e31a9 commit ad39944

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/e2e-desktop.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,13 @@ jobs:
131131
if: matrix.os == 'windows-latest'
132132
shell: pwsh
133133
run: |
134-
$edgePath = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
135-
if (-not (Test-Path $edgePath)) { $edgePath = "C:\Program Files\Microsoft\Edge\Application\msedge.exe" }
136-
$edgeVersion = (Get-Item $edgePath).VersionInfo.ProductVersion
137-
Write-Host "Edge version: $edgeVersion"
138-
$driverUrl = "https://msedgewebdriverstorage.blob.core.windows.net/edgewebdriver/$edgeVersion/edgedriver_win64.zip"
134+
# Tauri uses the WebView2 runtime, not Edge directly.
135+
# msedgedriver must match the WebView2 runtime version, not the Edge browser version.
136+
$wv2Key = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}'
137+
if (-not (Test-Path $wv2Key)) { $wv2Key = 'HKLM:\SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}' }
138+
$wv2Version = (Get-ItemProperty $wv2Key).pv
139+
Write-Host "WebView2 runtime version: $wv2Version"
140+
$driverUrl = "https://msedgewebdriverstorage.blob.core.windows.net/edgewebdriver/$wv2Version/edgedriver_win64.zip"
139141
$zipPath = "$env:TEMP\edgedriver.zip"
140142
$extractDir = "$env:TEMP\edgedriver"
141143
Invoke-WebRequest -Uri $driverUrl -OutFile $zipPath

0 commit comments

Comments
 (0)