The ChromeDriver getting started guide isn’t super helpful if you are unfamiliar with including the ChromeDriver location in your PATH environment variable. The PATH variable helps Chrome find the downloaded ChromeDriver exe. Don’t get me wrong, I’ve updated PATH variables on Windows for years but never on a Mac, until now:
System PATH Setup
The following instructions will help you create your own PATH to a unique folder on your Mac or copy the file to an existing PATH directory for ChromeDriver.
Download Chromedriver 79 For Mac Install Chromedriver Mac 1- Open this link to download chromedriver. 2-Download latest version of chromedriver for mac. 3- Unzip the file. 4- Copy the chromedriver and Open the Finder and click on Go it will open a dropdown menu. Automatically Download Chromedriver for Selenium. Automatically detects and downloads the latest chromedriver for Selenium in Python. Works cross-platform on Linux, Mac, Windows! 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? Based on the local Chrome browser version, click on the link for download. In the next page, choose the option chromedrivermac64.zip link for download for MacOS. Once the download is completed, a zip file gets created. We have to unzip it and we shall have a file called chromedriver.
- Download the ChromeDriver executable.
- Now we need to tell Selenium where it is and for that we have a few choices.To do this:
- Open up Terminal
- Run
sudo nano /etc/paths
- Enter your password
- Go to the bottom of the file and enter the path you wish to add
- My PATH looks like:
/Users/myname/Documents/WebDriver
- Control-x to quit
- Y to save
- Press enter to confirm
- To double check, quit Terminal and relaunch it. Run
echo $PATH
. You should see your newly added path in the stream of other paths already there. - Finally, update your tests to run using Chrome and run your tests!
After running your tests, if your PATH isn’t set up correctly you get this helpful message:
Did this work for you? Did it solve your problem? Please leave a comment below.
Additional Resources:
Chromedriver Mac Os
Oh and if this article worked for you please consider sharing it:
Webdriver For Chrome
Or buying me coffee.