How to disable chromedriver auto updates

Viewed 1322

One of the recurring questions I have found is "How to disable google chrome updates"

After some research, renaming the update folder and making sure the service gupdate never runs does the trick.

The issue I am now facing is chromedriver auto-updating, after running the first test. relevant vstestlog

Can't really find much information on this, so: Is there a way to prevent this update from happening automatically ?

additional info:

The setup we use are disposable VMs that spawn and get destroyed at the end of the automated test run, these are supported by packer images. chrome and chromedriver are installed via chocolatey, with the version pinned.

We basically want to ensure automated test pipelines keep running until we address the Google chrome and chromedriver updates (create a new image) I'd also take suggestions regarding a better way of handling the version updates (automated can cause some false-negatives as the coded UI tests may not be prepared to run in it yet)

2 Answers

Webdriver manager is the solution for these drivers you don't need to download and set up path for particular browsers. webdriver is a function that is doing

WebDriverManager

Maybe you can download manually webdriver from https://chromedriver.chromium.org/downloads, then extract to another directory. Or, if you have seen this path on console, you can copy the absolute path

console image

Then, you can pass parameter 1 in inisialization by absolute path to the executable driver that've been copied.

driver = webdriver.Chrome( "path/to/chromedriver")
Related