From 19717dd75837cd8c0a877f78cb270505af1b1702 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Mon, 6 Sep 2021 18:58:11 +0300 Subject: [PATCH] [Windows] Skip Edge installation for windows-2022 (#4027) --- images/win/scripts/Installers/Install-Edge.ps1 | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/images/win/scripts/Installers/Install-Edge.ps1 b/images/win/scripts/Installers/Install-Edge.ps1 index 1f4ce0ae4..5b1e3a444 100644 --- a/images/win/scripts/Installers/Install-Edge.ps1 +++ b/images/win/scripts/Installers/Install-Edge.ps1 @@ -3,7 +3,10 @@ ## Desc: Install latest stable version of Microsoft Edge browser ################################################################################ -Choco-Install -PackageName microsoft-edge +# Installed by default on Windows Server 2022 +if (-not (Test-IsWin22)) { + Choco-Install -PackageName microsoft-edge +} # Install Microsoft Edge WebDriver Write-Host "Install Edge WebDriver..." @@ -24,13 +27,6 @@ $EdgeDriverVersionFile = Start-DownloadWithRetry -Url $EdgeDriverVersionUrl -Nam Write-Host "Download Microsoft Edge WebDriver..." $EdgeDriverLatestVersion = Get-Content -Path $EdgeDriverVersionFile $EdgeDriverArchName = "edgedriver_win64.zip" -# A temporary workaround to install the previous driver version because 85.0.564.60 for win64 doesn't exist -if ($EdgeDriverLatestVersion -eq "85.0.564.60") -{ - $EdgeDriverLatestVersion = "85.0.564.51" - Set-Content -Path $EdgeDriverVersionFile -Value $EdgeDriverLatestVersion -} - $EdgeDriverDownloadUrl = "https://msedgedriver.azureedge.net/${EdgeDriverLatestVersion}/${EdgeDriverArchName}" $EdgeDriverArchPath = Start-DownloadWithRetry -Url $EdgeDriverDownloadUrl -Name $EdgeDriverArchName @@ -46,4 +42,4 @@ $PathValue = Get-ItemPropertyValue -Path $regEnvKey -Name 'Path' $PathValue += ";$EdgeDriverPath\" Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $PathValue -Invoke-PesterTests -TestFile "Browsers" -TestName "Edge" \ No newline at end of file +Invoke-PesterTests -TestFile "Browsers" -TestName "Edge"