2

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

Jamie Smith
  • 105
  • 2
  • 3
  • 9

2 Answers2

7

You might need to install it with : brew cask install chromedriver or brew install chromedriver

and then do which chromedriver

You will get the relevant path.

JohnBegood
  • 652
  • 1
  • 7
  • 8
4

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
pythad
  • 4,241
  • 2
  • 19
  • 41