mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Install chrome for testing in mac OS (#7990)
This commit is contained in:
committed by
GitHub
parent
7e863227d7
commit
ae5b1c7dff
@@ -3,6 +3,7 @@ function Build-BrowserSection {
|
||||
[ToolVersionNode]::new("Safari", $(Get-SafariVersion))
|
||||
[ToolVersionNode]::new("SafariDriver", $(Get-SafariDriverVersion))
|
||||
[ToolVersionNode]::new("Google Chrome", $(Get-ChromeVersion))
|
||||
[ToolVersionNode]::new("Google Chrome for Testing", $(Get-ChromeForTestingVersion))
|
||||
[ToolVersionNode]::new("ChromeDriver", $(Get-ChromeDriverVersion))
|
||||
[ToolVersionNode]::new("Microsoft Edge", $(Get-EdgeVersion))
|
||||
[ToolVersionNode]::new("Microsoft Edge WebDriver", $(Get-EdgeDriverVersion))
|
||||
@@ -19,7 +20,7 @@ function Get-SafariVersion {
|
||||
}
|
||||
|
||||
function Get-SafariDriverVersion {
|
||||
$version = Run-Command "safaridriver --version" | Take-Part -Part 3,4
|
||||
$version = Run-Command "safaridriver --version" | Take-Part -Part 3, 4
|
||||
return $version
|
||||
}
|
||||
|
||||
@@ -29,6 +30,12 @@ function Get-ChromeVersion {
|
||||
return ($version -replace ("^Google Chrome")).Trim()
|
||||
}
|
||||
|
||||
function Get-ChromeForTestingVersion {
|
||||
$chromePath = "/Applications/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
|
||||
$version = Run-Command "'${chromePath}' --version"
|
||||
return ($version -replace ("^Google Chrome for Testing")).Trim()
|
||||
}
|
||||
|
||||
function Get-ChromeDriverVersion {
|
||||
$rawOutput = Run-Command "chromedriver --version"
|
||||
$version = $rawOutput | Take-Part -Part 1
|
||||
|
||||
Reference in New Issue
Block a user