Installing ChromeDriver on macOS


The ChromeDriver getting started guide wasn’t super helpful with it’s installation instructions, mainly because I was unfamiliar with including the ChromeDriver location in my PATH environment variable (you have to help Chrome find the downloaded ChromeDriver). It also seems like a lot of work for something so common, I figured there had to be a better way.

Ways to install ChromeDriver on macOS:

These are the easiest ways I’ve found to install ChromeDriver on a mac, listed in order of ease:

  1. The easiest way to install ChromeDriver is to use a package manager to install the driver, like brew: brew install chromedriver. This requires you have Homebrew installed, but you probably should anyways.
  2. Run Chrome & ChromeDriver in a container using Docker. Simply download the combined container, start it and point your code at the right address.
  3. Specify it in your Selenium setup code and check it into source control like any other configuration detail. If you go this route, you can include additional drivers like GeckoDriver (aka Firefox) as well.
  4. Download the driver and add its location to your System PATH.

Which methods have you found the easiest or most success with? Leave a comment and let us know!

Additional References:

Updated: 10/17/2018