Tony
Tony

Reputation: 8287

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?

Upvotes: 25

Views: 72948

Answers (6)

Tony
Tony

Reputation: 8287

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 => Privacy & Security" => Security and click "Allow Anyway" to accept the risk. Then on the next run, you'll have to click "Open" once.

Upvotes: 79

Jim Szalewski
Jim Szalewski

Reputation: 81

I have recently have issues where I would receive a warning about chromedriver's developer not being trusted. To resolve this I use brew info chromedriver which gives the directory for chromedriver. Change into that directory and type ls -l and if the code like drwxr-xr-x has an @ at the end, that means your mac has quarantined that file. To pull it out of quarantine, type xattr -d com.apple.quarantine chromedriver. Then you should be good to go.

Upvotes: 7

Sankeerna Reddy
Sankeerna Reddy

Reputation: 199

Uninstalling & installing the chromedriver worked -

brew uninstall chromedriver
brew install --cask chromedriver

Upvotes: 7

Big Pumpkin
Big Pumpkin

Reputation: 4467

When I initially ran the following commands,

brew upgrade chromedriver 
brew upgrade --cask chromedriver 
brew uninstall chromedriver

I got the error below.

Error: Cask 'chromedriver' is not installed.

So I had to remove the chromedriver not managed by Homebrew first.

rm `which chromedriver` 

After that, brew install chromedriver successfully installed the latest version.

Upvotes: 3

Vova
Vova

Reputation: 3541

I would recommend start using webdriver-manager:

pip install webdriver-manager

what I prefer mostly and use it like:

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())

with that package you should not worry about version of chromedriver, even though, you can even choose particular chrome driver version:

driver = webdriver.Chrome(ChromeDriverManager(version='86.0.4240.22').install())

it is not the solution of the ticket, but it makes live easier working with chromedriver

Upvotes: 8

Matt Kennedy
Matt Kennedy

Reputation: 415

Now its just brew upgrade chromedriver no longer cask

Upvotes: 3

Related Questions