Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update chromedriver to the latest version on MacOS using homebrew?

My current version is 81.0.4044.69 and I want to update to the latest version 83.0.4103.39

When I open Terminal and I do: brew cask install chromedriver

It says: Warning: Cask 'chromedriver' is already installed.

How can I update to the latest version 83.0.4103.39?

like image 495
Tony Avatar asked May 28 '20 19:05

Tony


People also ask

How do I find my current ChromeDriver version?

In addition, the version of ChromeDriver for the current stable release of Chrome can be found at https://chromedriver.storage.googleapis.com/LATEST_RELEASE.

How do I download the correct version of the chromedriver?

Luckily, the ChromeDriver website provides a systematic way of downloading the correct version of the ChromeDriver given a specific version of Google Chrome. First, find out which version of Chrome you are using. Let's say you have Chrome 72.0.3626.81.

How to fix chromedriver incompatible with the installed version of chrome?

When the ChromeDriver is incompatible with the installed version of Google Chrome, you will run into the error above. The fix is pretty simple, go back to the ChromeDriver website and download the most recent version. But doing this manually every time Chrome updates will quickly become unmanageable.

Does homebrew ever get updated?

Of course like any other software, Homebrew itself along with the command line tools get updated, so you might be wondering how to update Homebrew, and how to upgrade Homebrew packages to newer versions.

How to fix Google Chrome driver not updating?

The fix is pretty simple, go back to the ChromeDriver website and download the most recent version. But doing this manually every time Chrome updates will quickly become unmanageable. Especially when you run UI tests on multiple servers, on a periodic basis, or inside a continuous integration and deployment pipeline.


1 Answers

UPDATE: Now you can also do:

brew update
brew upgrade chromedriver

or

brew update
brew upgrade --cask chromedriver

Also be aware that after each upgrade you will get again a system warning when using the chromedriver for the first time so you need to click Cancel in the warning and then go to "Preferences => Security & Privacy" and click "Allow Anyway" to accept the risk. Then on the next run, you'll have to click "Open" once.


Note: The answer below was given for an older version and may not work anymore


I found out that I should do:

brew update
brew cask upgrade chromedriver

Another option is to uninstall and install it again like this:

brew cask uninstall chromedriver
==> Uninstalling Cask chromedriver
==> Unlinking Binary '/usr/local/bin/chromedriver'.
==> Purging files for version 81.0.4044.69 of Cask chromedriver

brew cask install chromedriver
==> Downloading https://chromedriver.storage.googleapis.com/83.0.4103.39/chromedriver_mac64.zip
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'chromedriver'.
==> Installing Cask chromedriver
==> Linking Binary 'chromedriver' to '/usr/local/bin/chromedriver'.
🍺  chromedriver was successfully installed!

Now:

chromedriver --version
ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416})
like image 113
Tony Avatar answered Sep 21 '22 10:09

Tony