[Windows] Pin Selenium to 3.141.59 version (#4276)

This commit is contained in:
Dibir Magomedsaygitov
2021-10-15 11:36:47 +03:00
committed by GitHub
parent 7c1a240d2b
commit e6679307f9

View File

@@ -9,11 +9,12 @@ $seleniumFileName = "selenium-server-standalone.jar"
New-Item -ItemType directory -Path $seleniumDirectory
# Download Selenium
$url = "https://api.github.com/repos/SeleniumHQ/selenium/releases/latest"
[System.String] $seleniumReleaseUrl = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "selenium-server-standalone-.+.jar"
# Temporarily download Selenium 3.141.59, since 4.* can contain some breaking changes
#$url = "https://api.github.com/repos/SeleniumHQ/selenium/releases"
#[System.String] $seleniumReleaseUrl = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "selenium-server-standalone-.+.jar"
Start-DownloadWithRetry -Url $seleniumReleaseUrl -Name $seleniumFileName -DownloadPath $seleniumDirectory
$seleniumDownloadUrl = "https://github.com/SeleniumHQ/selenium/releases/download/selenium-3.141.59/selenium-server-standalone-3.141.59.jar"
Start-DownloadWithRetry -Url $seleniumDownloadUrl -Name $seleniumFileName -DownloadPath $seleniumDirectory
# Add SELENIUM_JAR_PATH environment variable
$seleniumBinPath = Join-Path $seleniumDirectory $seleniumFileName