Install chrome for testing in mac OS (#7990)

This commit is contained in:
Vasilii Polikarpov
2023-07-28 21:09:52 +02:00
committed by GitHub
parent 7e863227d7
commit ae5b1c7dff
3 changed files with 55 additions and 9 deletions

View File

@@ -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