From 10b5d541e8de12b2e567f3b2134d30c092614dc7 Mon Sep 17 00:00:00 2001 From: Gladwin Johnson <90415114+gladjohn@users.noreply.github.com> Date: Mon, 5 Feb 2024 21:28:03 -0800 Subject: [PATCH 1/3] Update installEdgeDriver.ps1 to fetch Edge version dynamically Update installEdgeDriver.ps1 to fetch Edge version dynamically --- build/installEdgeDriver.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/installEdgeDriver.ps1 b/build/installEdgeDriver.ps1 index 09799155a5..8e35e881ad 100644 --- a/build/installEdgeDriver.ps1 +++ b/build/installEdgeDriver.ps1 @@ -1,4 +1,7 @@ -$url = "https://msedgedriver.azureedge.net/119.0.2151.72/edgedriver_win64.zip" #Chrome Driver from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ +# Get the installed version of Microsoft Edge +$edgeVersion = (Get-Item "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe").VersionInfo.ProductVersion + +$url = "https://msedgedriver.azureedge.net/$edgeVersion/edgedriver_win64.zip" #Chrome Driver from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ $fileName = "edgedriver_win64.zip" $source = "C:\Downloads\$fileName" $destination = "C:\Program Files\dotnet\" From 79f344d03c7829d0d08986b81aef912ef35d408e Mon Sep 17 00:00:00 2001 From: Gladwin Johnson <90415114+gladjohn@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:08:31 -0800 Subject: [PATCH 2/3] Update installEdgeDriver.ps1 --- build/installEdgeDriver.ps1 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build/installEdgeDriver.ps1 b/build/installEdgeDriver.ps1 index 8e35e881ad..8cf69cb104 100644 --- a/build/installEdgeDriver.ps1 +++ b/build/installEdgeDriver.ps1 @@ -1,7 +1,14 @@ # Get the installed version of Microsoft Edge -$edgeVersion = (Get-Item "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe").VersionInfo.ProductVersion +$edgeVersion = $(Get-Item "${env:ProgramFiles(x86)}\Microsoft\Edge\Application\msedge.exe").VersionInfo.ProductVersion -$url = "https://msedgedriver.azureedge.net/$edgeVersion/edgedriver_win64.zip" #Chrome Driver from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ +# Check if $edgeVersion is null or empty +if ([string]::IsNullOrEmpty($edgeVersion)) { + Write-Host $errors; + echo "##vso[task.logissue type=error]Microsoft Edge version is not found. Please ensure Microsoft Edge is installed." + echo "##vso[task.complete result=Failed;]Failed" + } + +$url = "https://msedgedriver.azureedge.net/$edgeVersion/edgedriver_win64.zip" #Edge Driver from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ $fileName = "edgedriver_win64.zip" $source = "C:\Downloads\$fileName" $destination = "C:\Program Files\dotnet\" From 185cb28f12c91192fd7cad6d8fca2734a12c481b Mon Sep 17 00:00:00 2001 From: Gladwin Johnson <90415114+gladjohn@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:30:41 -0800 Subject: [PATCH 3/3] Update installEdgeDriver.ps1 --- build/installEdgeDriver.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/build/installEdgeDriver.ps1 b/build/installEdgeDriver.ps1 index 8cf69cb104..6d108824ee 100644 --- a/build/installEdgeDriver.ps1 +++ b/build/installEdgeDriver.ps1 @@ -3,7 +3,6 @@ $edgeVersion = $(Get-Item "${env:ProgramFiles(x86)}\Microsoft\Edge\Application\m # Check if $edgeVersion is null or empty if ([string]::IsNullOrEmpty($edgeVersion)) { - Write-Host $errors; echo "##vso[task.logissue type=error]Microsoft Edge version is not found. Please ensure Microsoft Edge is installed." echo "##vso[task.complete result=Failed;]Failed" }