I am trying to get selenium to use chromedriver on mac.
I have downloaded the mac version of chromedriver and added it to the same folder as my python file. I am then using:
driver = webdriver.Chrome()
however it doesn't seem to be opening.
This works fine in windows but just not working on mac. anyone got any ideas?
Thanks
You might need to install it with :
brew install chromedriver --cask or
brew install chromedriver
and then do
which chromedriver
You will get the relevant path.
You either have to provide a path to binary when creating an instance of webdrive.Chrome():
chromedriver = "/path/to/chromedriver/folder"
driver = webdriver.Chrome(chromedriver)
or chromedriver has to be in you PATH. You can add chromedriver to PATH with
export PATH=$PATH:/path/to/chromedriver/folder
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