From 1def28243de16d4b555a9475f871bac5aad465fa Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Fri, 30 Sep 2022 21:07:26 +0300 Subject: [PATCH] [Windows] Test Chrome and Chrome Driver major versions are the same (#6332) * Add Chrome + Chromedriver test * Get chromedriver version from versioninfo.txt * Use VersionInfo.ProductMajorPart * Add missing test cases block --- images/win/scripts/Tests/Browsers.Tests.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/images/win/scripts/Tests/Browsers.Tests.ps1 b/images/win/scripts/Tests/Browsers.Tests.ps1 index 89fd9b5e..ba5db877 100644 --- a/images/win/scripts/Tests/Browsers.Tests.ps1 +++ b/images/win/scripts/Tests/Browsers.Tests.ps1 @@ -47,6 +47,12 @@ Describe "Chrome" { $chromePath | Should -Exist $chromeName | Should -BeExactly "chrome.exe" } + + It "Chrome and Chrome Driver major versions are the same" -TestCases @{chromePath = $chromePath} { + $chromeMajor = (Get-Item $chromePath).VersionInfo.ProductMajorPart + $chromeDriverMajor = (Get-Content $env:ChromeWebDriver\versioninfo.txt).Split(".")[0] + $chromeMajor | Should -BeExactly $chromeDriverMajor + } } }