Installing ChromeDriver on macOS

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). Also it’s a lot of work for something so common. Never fear, here is a better way:

Installing on macOS:

Listed in order of easiest to hardest install, these are the best ways to install ChromeDriver on a Mac:

  • The easiest way to install ChromeDriver is to use your package manager such as brew or npm to install the driver.
    • In your terminal window with the Homebrew package manager:
      • Install ChromeDriver with brew install cask chromedriver
      • Confirm it was installed using chromedriver --version and seeing it returns a version. If it errors it wasn’t installed
    • Other package managers like npm have similar commands npm install chromedriver
  • Run Chrome & ChromeDriver in a container using Docker. Simply download the combined container, start it and point your code at the right address.
  • 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.
  • Download the driver and add its location to your System PATH.

Which methods have you found the easiest or most success with? Which methods didn’t work for you? Please leave a comment below. 

Additional Resources

Oh and if this article worked for you please consider sharing it or buying me coffee to say thanks.

Subscribe to Chris Kenst

Sign up now to get access to the library of members-only issues.
Jamie Larson
Subscribe