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
?
In addition, the version of ChromeDriver for the current stable release of Chrome can be found at https://chromedriver.storage.googleapis.com/LATEST_RELEASE.
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.
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.
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.
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.
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})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With