mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Install Selenium (draft)
This commit is contained in:
@@ -336,6 +336,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-Firefox.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-Firefox.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-Selenium.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
@@ -306,6 +306,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-Firefox.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-Firefox.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-Selenium.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
21
images/win/scripts/Installers/Install-Selenium.ps1
Normal file
21
images/win/scripts/Installers/Install-Selenium.ps1
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
################################################################################
|
||||||
|
## File: Install-Selenium.ps1
|
||||||
|
## Desc: Install Selenium Server standalone
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Acquire latest Selenium release number from GitHub API
|
||||||
|
$latestReleaseUrl = "https://api.github.com/repos/SeleniumHQ/selenium/releases/latest"
|
||||||
|
$latestReleaseInfo = Invoke-RestMethod -Uri $latestReleaseUrl
|
||||||
|
$seleniumVersionString = $latestReleaseInfo.name.Split(" ")[1]
|
||||||
|
$seleniumVersion = [version]::Parse($seleniumVersionString)
|
||||||
|
|
||||||
|
# Download Selenium
|
||||||
|
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"
|
||||||
|
$seleniumBinPath = "C:\selenium\selenium-server-standalone.jar"
|
||||||
|
Invoke-WebRequest -UseBasicParsing -Uri $seleniumReleaseUrl -OutFile $seleniumBinPath
|
||||||
|
|
||||||
|
setx "CLASSPATH" "$($seleniumBinPath):$($env:CLASSPATH)" /M
|
||||||
|
|
||||||
|
exit 0
|
||||||
Reference in New Issue
Block a user