mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-15 06:19:21 +00:00
[Ubuntu] Implement new directories hierarchy (#8627)
This commit is contained in:
committed by
GitHub
parent
d1f2c9a3be
commit
5d40b1e213
61
images/ubuntu/scripts/docs-gen/SoftwareReport.Browsers.psm1
Normal file
61
images/ubuntu/scripts/docs-gen/SoftwareReport.Browsers.psm1
Normal file
@@ -0,0 +1,61 @@
|
||||
function Get-ChromeVersion {
|
||||
$googleChromeVersion = google-chrome --version | Take-OutputPart -Part 2
|
||||
return $googleChromeVersion
|
||||
}
|
||||
|
||||
function Get-ChromeDriverVersion {
|
||||
$chromeDriverVersion = chromedriver --version | Take-OutputPart -Part 1
|
||||
return $chromeDriverVersion
|
||||
}
|
||||
|
||||
function Get-FirefoxVersion {
|
||||
$firefoxVersion = $(firefox --version) | Take-OutputPart -Part 2
|
||||
return $firefoxVersion
|
||||
}
|
||||
|
||||
function Get-GeckodriverVersion {
|
||||
$geckodriverVersion = geckodriver --version | Select-Object -First 1 | Take-OutputPart -Part 1
|
||||
return $geckodriverVersion
|
||||
}
|
||||
|
||||
function Get-ChromiumVersion {
|
||||
$chromiumVersion = chromium-browser --version | Take-OutputPart -Part 1
|
||||
return $chromiumVersion
|
||||
}
|
||||
|
||||
function Get-EdgeVersion {
|
||||
$edgeVersion = (microsoft-edge --version).Trim() | Take-OutputPart -Part 2
|
||||
return $edgeVersion
|
||||
}
|
||||
|
||||
function Get-EdgeDriverVersion {
|
||||
$edgeDriverVersion = msedgedriver --version | Take-OutputPart -Part 3
|
||||
return $edgeDriverVersion
|
||||
}
|
||||
|
||||
function Get-SeleniumVersion {
|
||||
$seleniumBinaryName = Get-ToolsetValue "selenium.binary_name"
|
||||
$fullSeleniumVersion = (Get-ChildItem "/usr/share/java/${seleniumBinaryName}-*").Name -replace "${seleniumBinaryName}-"
|
||||
return $fullSeleniumVersion
|
||||
}
|
||||
|
||||
function Build-BrowserWebdriversEnvironmentTable {
|
||||
return @(
|
||||
[PSCustomObject] @{
|
||||
"Name" = "CHROMEWEBDRIVER"
|
||||
"Value" = $env:CHROMEWEBDRIVER
|
||||
},
|
||||
[PSCustomObject] @{
|
||||
"Name" = "EDGEWEBDRIVER"
|
||||
"Value" = $env:EDGEWEBDRIVER
|
||||
},
|
||||
[PSCustomObject] @{
|
||||
"Name" = "GECKOWEBDRIVER"
|
||||
"Value" = $env:GECKOWEBDRIVER
|
||||
},
|
||||
[PSCustomObject] @{
|
||||
"Name" = "SELENIUM_JAR_PATH"
|
||||
"Value" = $env:SELENIUM_JAR_PATH
|
||||
}
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user