Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions images/win/scripts/Installers/Install-Selenium.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Desc: Install Selenium Server standalone
################################################################################

Import-Module -Name ImageHelpers -Force

# Acquire latest Selenium release number from GitHub API
$latestReleaseUrl = "https://api.github.com/repos/SeleniumHQ/selenium/releases/latest"
try {
Expand All @@ -21,15 +23,11 @@ Write-Host "Downloading selenium-server-standalone v$seleniumVersion..."

$seleniumReleaseUrl = "https://selenium-release.storage.googleapis.com/$($seleniumVersion.ToString(2))/selenium-server-standalone-$($seleniumVersion.ToString(3)).jar"
New-Item -ItemType directory -Path "C:\selenium\"
Comment thread
vsafonkin marked this conversation as resolved.
Outdated
$seleniumBinPath = "C:\selenium\selenium-server-standalone.jar"
try {
Invoke-WebRequest -UseBasicParsing -Uri $seleniumReleaseUrl -OutFile $seleniumBinPath
} catch {
Write-Error $_
exit 1
}

Start-DownloadWithRetry -Url $seleniumReleaseUrl -Name "selenium-server-standalone.jar" -DownloadPath "C:\selenium\"

Write-Host "Add selenium jar to the environment variables..."
$seleniumBinPath = "C:\selenium\selenium-server-standalone.jar"
setx "SELENIUM_JAR_PATH" "$($seleniumBinPath)" /M

exit 0
Comment thread
vsafonkin marked this conversation as resolved.
Outdated