mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 05:07:02 +00:00
* Use Resolve-GithubReleaseAssetUrl more widely * Add the Get-ChecksumFromUrl function * Sort exported functions and add docs * Remove alias and fix typo * Fix kind checksum url and syntax * Fix checksums url for gh cli and msys2 * [Windows] Cleanup various scripts * Add spaces after type specifications * Rename the Take-Part function
31 lines
1.2 KiB
PowerShell
31 lines
1.2 KiB
PowerShell
################################################################################
|
|
## File: Install-IEWebDriver.ps1
|
|
## Desc: Install IE Web Driver
|
|
################################################################################
|
|
|
|
$seleniumMajorVersion = (Get-ToolsetContent).selenium.version
|
|
$ieDriverUrl = Resolve-GithubReleaseAssetUrl `
|
|
-Repo "SeleniumHQ/selenium" `
|
|
-Version "$seleniumMajorVersion.*" `
|
|
-Asset "IEDriverServer_x64_*.zip"
|
|
|
|
# Download IE selenium driver
|
|
Write-Host "Selenium IEDriverServer download and install..."
|
|
$driverZipFile = Invoke-DownloadWithRetry $ieDriverUrl
|
|
|
|
$ieDriverPath = "C:\SeleniumWebDrivers\IEDriver"
|
|
if (-not (Test-Path -Path $ieDriverPath)) {
|
|
New-Item -Path $ieDriverPath -ItemType Directory -Force | Out-Null
|
|
}
|
|
|
|
Expand-7ZipArchive -Path $driverZipFile -DestinationPath $ieDriverPath
|
|
Remove-Item $driverZipFile
|
|
|
|
Write-Host "Get the IEDriver version..."
|
|
(Get-Item "$ieDriverPath\IEDriverServer.exe").VersionInfo.FileVersion | Out-File -FilePath "$ieDriverPath\versioninfo.txt"
|
|
|
|
Write-Host "Setting the IEWebDriver environment variables"
|
|
[Environment]::SetEnvironmentVariable("IEWebDriver", $ieDriverPath, "Machine")
|
|
|
|
Invoke-PesterTests -TestFile "Browsers" -TestName "Internet Explorer"
|