> ## Content Index
> Fetch the complete content index at: https://www.kenst.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Including the ChromeDriver location in MacOS System PATH
- URL: https://www.kenst.com/including-the-chromedriver-location-in-macos-system-path/
- Published: 2015-03-18T20:53:00.000Z
- Updated: 2022-06-10T00:10:56.000Z
- Author: Chris Kenst
- Tags: Selenium, Configuration, Test Automation

The ChromeDriver[ getting started guide](https://sites.google.com/a/chromium.org/chromedriver/getting-started?ref=kenst.com) 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.

1. Download the [ChromeDriver executable](https://sites.google.com/a/chromium.org/chromedriver/?ref=kenst.com).
2. Now we need to tell Selenium where it is and for that we have a few choices.To do this:  
  1. Open up Terminal
  2. Run `sudo nano /etc/paths`
  3. Enter your password
  4. Go to the bottom of the file and enter the path you wish to add
  5. My PATH looks like: `/Users/myname/Documents/WebDriver`
  6. Control-x to quit
  7. Y to save
  8. Press enter to confirm
3. 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.
4. 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:

```
Selenium::WebDriver::Error::WebDriverError: Unable to find the chromedriver executable. Please download the server from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH. More info at http://code.google.com/p/selenium/wiki/ChromeDriver.
```

Did this work for you? Did it solve your problem? Please leave a comment below. 

Or consider[ buying me coffee](https://ko-fi.com/ckenst?ref=kenst.com).

## Additional Resources:

- [Installing ChromeDriver on macOS](https://www.kenst.com/installing-chromedriver-on-windows/)
- [Adding to the PATH on a Mac](http://architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion?ref=kenst.com)