Skip to content

Commit

Permalink
fix: Add chromedriver binary in its updated version (microsoft#4596)
Browse files Browse the repository at this point in the history
* add chromedriver binary

* remove chromedriver jobs in pipeline

* include binary information
  • Loading branch information
JhontSouth authored Jan 9, 2024
1 parent 3418fa9 commit 8a30768
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 180 deletions.
47 changes: 0 additions & 47 deletions testing/browser-functional/browser-tests-build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,53 +31,6 @@ steps:
displayName: 'Create DateTimeTag for Resource Group'
# Get-Date on Azure DevOps returns a datetime relative to UTC-0, so "Z" is being used instead of the dynamic "K".

- task: PowerShell@2
inputs:
targetType: inline
script: |
$packageName = "chromedriver";
Write-Host "Get $packageName second latest version from npmjs.com";
$versions = npm view $packageName versions | ConvertFrom-Json;
$versionToUse = $versions[-2];
Write-Host "$packageName second latest = $versionToUse";
" "
if ($null -ne $Env:ChromeDriverVersionOverride -and $Env:ChromeDriverVersionOverride.Trim() -ne '') {
Write-Host "Pipeline var ChromeDriverVersionOverride is set.";
$versionToUse = $Env:ChromeDriverVersionOverride;
Write-Host "Use override value = $versionToUse";
} else {
Write-Host "Pipeline var ChromeDriverVersionOverride is not set.";
Write-Host "Use value = $versionToUse";
}
"##vso[task.setvariable variable=DriverVersion;]$versionToUse";
displayName: 'Get chromedriver version number to use'

- task: PowerShell@2
inputs:
targetType: inline
script: |
# This lets the pipeline automatically keep up with Chrome browser upgrades.
# Chrome browser upgrades on ADO agents lag behind chromedriver upgrades, so
# if we use the second latest chromedriver, that should keep the tests working.
$path = "$(System.DefaultWorkingDirectory)/testing/browser-functional/package.json";
$package = 'chromedriver';
$newVersion = "$(DriverVersion)";
$find = "$package`": `"\S*`"";
$replace = "$package`": `"$newVersion`"";
Get-ChildItem -Path "$path" | % {
$_.FullName;
$content = Get-Content -Raw $_.FullName;
$content -Replace "$find", "$replace" | Set-Content $_.FullName;
'-------------'; get-content $_.FullName; '==================='
}
displayName: 'Upgrade chromedriver version reference'

- task: NodeTool@0
displayName: use node 16.x
inputs:
Expand Down
Binary file added testing/browser-functional/chromedriver.exe
Binary file not shown.
20 changes: 13 additions & 7 deletions testing/browser-functional/nightwatch.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const chromedriver = require('chromedriver');
const seleniumServer = require('selenium-server');
const geckodriver = require('geckodriver');

Expand All @@ -21,7 +20,6 @@ module.exports = {
server_path: seleniumServer.path,
cli_args: {
'webdriver.gecko.driver': geckodriver.path,
'webdriver.chrome.driver': chromedriver.path,
},
},
webdriver: {
Expand All @@ -30,14 +28,22 @@ module.exports = {
},

chrome: {
extends: 'selenium',
silent: true,
selenium: {
start_process: false,
},
webdriver: {
start_process: true,
//The tests with the chrome browser are performed with the chromedriver binary
//which in the future should be updated manually to maintain compatibility with the browser.
//Current version 120.0.6. Extract binary from: https://googlechromelabs.github.io/chrome-for-testing
server_path: "./chromedriver.exe",
port: 9515,
},
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true,
chromeOptions: {
w3c: false,
},
acceptSslCerts: true
},
},

Expand Down
1 change: 0 additions & 1 deletion testing/browser-functional/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"description": "Test to check browser compatibility",
"main": "",
"devDependencies": {
"chromedriver": "^100.0.0",
"dotenv": "^8.6.0",
"geckodriver": "^1.19.1",
"nightwatch": "^2.6.21",
Expand Down
129 changes: 4 additions & 125 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1939,11 +1939,6 @@
resolved "https://registry.yarnpkg.com/@standardlabs/is-private/-/is-private-1.0.1.tgz#bf0196f91d294cfe60c2f2892ee2e085f0b27471"
integrity sha512-gzFtZ7e1Ob7HXzGe4IoQWM/qWydboNLtMDWd3OqtyQo0Ngir24bzWu016TulH2w5SyvOr0LbMw1b3K10IocNIA==

"@testim/chrome-version@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@testim/chrome-version/-/chrome-version-1.1.2.tgz#092005c5b77bd3bb6576a4677110a11485e11864"
integrity sha512-1c4ZOETSRpI0iBfIFUqU4KqwBAB2lHUAlBjZz/YqOHqwM9dTTzjV6Km0ZkiEiSCx/tLr1BtESIKyWWMww+RUqw==

"@tootallnate/once@1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
Expand Down Expand Up @@ -2385,13 +2380,6 @@
dependencies:
"@types/yargs-parser" "*"

"@types/yauzl@^2.9.1":
version "2.9.1"
resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.1.tgz#d10f69f9f522eef3cf98e30afb684a1e1ec923af"
integrity sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==
dependencies:
"@types/node" "*"

"@typescript-eslint/eslint-plugin@^4.16.1":
version "4.16.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz#2caf6a79dd19c3853b8d39769a27fccb24e4e651"
Expand Down Expand Up @@ -3268,13 +3256,6 @@ axios@^0.21.1, axios@~0.21.1:
dependencies:
follow-redirects "^1.14.0"

axios@^0.24.0:
version "0.24.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6"
integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==
dependencies:
follow-redirects "^1.14.4"

axios@^1.6.0:
version "1.6.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2"
Expand Down Expand Up @@ -3762,11 +3743,6 @@ btoa@^1.1.2:
resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.2.1.tgz#01a9909f8b2c93f6bf680ba26131eb30f7fa3d73"
integrity sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==

buffer-crc32@~0.2.3:
version "0.2.13"
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=

[email protected]:
version "1.0.1"
resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
Expand Down Expand Up @@ -4148,19 +4124,6 @@ chrome-trace-event@^1.0.2:
dependencies:
tslib "^1.9.0"

chromedriver@^100.0.0:
version "100.0.0"
resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-100.0.0.tgz#1b4bf5c89cea12c79f53bc94d8f5bb5aa79ed7be"
integrity sha512-oLfB0IgFEGY9qYpFQO/BNSXbPw7bgfJUN5VX8Okps9W2qNT4IqKh5hDwKWtpUIQNI6K3ToWe2/J5NdpurTY02g==
dependencies:
"@testim/chrome-version" "^1.1.2"
axios "^0.24.0"
del "^6.0.0"
extract-zip "^2.0.1"
https-proxy-agent "^5.0.0"
proxy-from-env "^1.1.0"
tcp-port-used "^1.0.1"

[email protected]:
version "3.3.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2"
Expand Down Expand Up @@ -4835,7 +4798,7 @@ [email protected], debug@^3.2.6:
dependencies:
ms "^2.1.1"

debug@4, debug@4.3.1, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0:
debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0:
version "4.3.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
Expand Down Expand Up @@ -4997,20 +4960,6 @@ del@^4.1.1:
pify "^4.0.1"
rimraf "^2.6.3"

del@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952"
integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==
dependencies:
globby "^11.0.1"
graceful-fs "^4.2.4"
is-glob "^4.0.1"
is-path-cwd "^2.2.0"
is-path-inside "^3.0.2"
p-map "^4.0.0"
rimraf "^3.0.2"
slash "^3.0.0"

delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
Expand Down Expand Up @@ -6099,17 +6048,6 @@ extract-stack@^1.0.0:
resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-1.0.0.tgz#b97acaf9441eea2332529624b732fc5a1c8165fa"
integrity sha512-M5Ge0JIrn12EtIVpje2G+hI5X78hmX4UDzynZ7Vnp1MiPSqleEonmgr2Rh59eygEEgq3YJ1GDP96rnM8tnVg/Q==

extract-zip@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==
dependencies:
debug "^4.1.1"
get-stream "^5.1.0"
yauzl "^2.10.0"
optionalDependencies:
"@types/yauzl" "^2.9.1"

[email protected]:
version "1.3.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
Expand Down Expand Up @@ -6207,13 +6145,6 @@ fastq@^1.6.0:
dependencies:
reusify "^1.0.4"

fd-slicer@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=
dependencies:
pend "~1.2.0"

figgy-pudding@^3.5.1:
version "3.5.2"
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
Expand Down Expand Up @@ -6428,7 +6359,7 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@^1.14.0, follow-redirects@^1.14.4:
follow-redirects@^1.14.0:
version "1.14.7"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==
Expand Down Expand Up @@ -6761,13 +6692,6 @@ get-stream@^4.0.0:
dependencies:
pump "^3.0.0"

get-stream@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3"
integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==
dependencies:
pump "^3.0.0"

get-stream@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718"
Expand Down Expand Up @@ -7086,7 +7010,7 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==

graceful-fs@^4.2.4, graceful-fs@^4.2.6:
graceful-fs@^4.2.6:
version "4.2.6"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==
Expand Down Expand Up @@ -7676,11 +7600,6 @@ invert-kv@^1.0.0:
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY=

ip-regex@^4.1.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5"
integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==

ip@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
Expand Down Expand Up @@ -7914,7 +7833,7 @@ is-object@^1.0.1:
resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470"
integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA=

is-path-cwd@^2.0.0, is-path-cwd@^2.2.0:
is-path-cwd@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb"
integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==
Expand All @@ -7933,11 +7852,6 @@ is-path-inside@^2.1.0:
dependencies:
path-is-inside "^1.0.2"

is-path-inside@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283"
integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==

is-plain-obj@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
Expand Down Expand Up @@ -8033,11 +7947,6 @@ is-unicode-supported@^0.1.0:
resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7"
integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==

is-url@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52"
integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==

is-utf8@^0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
Expand All @@ -8060,15 +7969,6 @@ is-wsl@^2.1.1, is-wsl@^2.2.0:
dependencies:
is-docker "^2.0.0"

is2@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.6.tgz#094f887248b49ba7ce278f8c39f85a70927bb5de"
integrity sha512-+Z62OHOjA6k2sUDOKXoZI3EXv7Fb1K52jpTBLbkfx62bcUeSsrTBLhEquCRDKTx0XE5XbHcG/S2vrtE3lnEDsQ==
dependencies:
deep-is "^0.1.3"
ip-regex "^4.1.0"
is-url "^1.2.4"

[email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
Expand Down Expand Up @@ -10627,11 +10527,6 @@ pbkdf2@^3.0.3:
safe-buffer "^5.0.1"
sha.js "^2.4.8"

pend@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA=

picocolors@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
Expand Down Expand Up @@ -12666,14 +12561,6 @@ tar@^6.1.11:
mkdirp "^1.0.3"
yallist "^4.0.0"

tcp-port-used@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/tcp-port-used/-/tcp-port-used-1.0.2.tgz#9652b7436eb1f4cfae111c79b558a25769f6faea"
integrity sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==
dependencies:
debug "4.3.1"
is2 "^2.0.6"

terser-webpack-plugin@^1.4.3:
version "1.4.5"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b"
Expand Down Expand Up @@ -14091,14 +13978,6 @@ yargs@^15.0.2:
y18n "^4.0.0"
yargs-parser "^18.1.2"

yauzl@^2.10.0:
version "2.10.0"
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
dependencies:
buffer-crc32 "~0.2.3"
fd-slicer "~1.1.0"

[email protected]:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
Expand Down

0 comments on commit 8a30768

Please sign in to comment.