This post was most recently updated on March 28th, 2023.
2 min read.Uh, okay, well. So this is where you should just RTFM (that’s along the lines of “check the documentation” for those uninitiated in the world of unnecessary abbreviations). But as we’ve found out before, Microsoft’s documentation on the agent’s installed software isn’t always up-to-date. That’s why I added this simple snippet on my pipeline to figure out which version of the browser AND the webdriver are installed on the machine.
The snippets below can be combined with logic to install different versions of Chrome and the WebDriver, if need be. And of course, while I’m using Chrome, you could use Firefox and the GeckoWebDriver instead – it’s just a matter of changing the respective apps in the snippets!
Solution
Well, this turned out to be fairly simple. For our convenience, let’s echo both the VersionInfo of the browser executable and the version output of the WebDriver!
The following YAML will output the Chrome and Chrome WebDriver versions nicely in your build log.
- powershell: |
(Get-Item "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe").VersionInfo
displayName: 'We want to know the Chrome version installed on this darned machine'
- pwsh: |
chromeDriver -v
displayName: Echo Chrome WebDriver version
If you get an error, something like below:
chromeDriver : The term 'chromeDriver' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Then see this post on how to configure your pipeline to use the WebDriver that’s installed on the build agent already:
And that’s about it. If you run into any issues, let me know in the comments section below!
- Am I the problem? Even onboarding to the Apple ecosystem failed miserably. - July 8, 2025
- Any kubectl command throws “Unhandled Error” err=”couldn’t get current server API group list: Get \”http://localhost:8080/api?timeout=32s\”: dial tcp [::1]:8080: connect: connection refused” – what do? - July 1, 2025
- “Sync error. We are having trouble syncing. Click ‘Sign in again’ to fix the issue.” in OneNote? Let’s fix it! - June 24, 2025