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:
It will direct you to the 'downloads' page of Selenium official website. Scroll down through the web page and locate SafariDriver. Click on the 'Latest Release' option to download the latest version of SafariDriver. Double click on the downloaded file. This will launch a pop-up box on your Safari browser extension window. Don’t use the old SafariDriver implementation, which is no longer supported by the Selenium project. The Apple-developed driver is a replacement for the legacy SafariDriver formerly maintained by the Selenium project. Configure Safari to Enable WebDriver Support. Safari’s WebDriver support for developers is turned off by default. Selenium is the all-in-one research application for your Mac. Whether you're a student, professional researcher, or just someone with an insatiable thirst for knowledge, Selenium is for you.
![Download Safari Webdriver For Selenium In Mac Download Safari Webdriver For Selenium In Mac](/uploads/1/3/4/0/134067717/859170956.png)
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 cask install chromedriver
- Confirm it was installed using
chromedriver --version
and seeing it returns a version. If it errors it wasn’t installed
- Install ChromeDriver with
- Other package managers like npm have similar commands
npm install chromedriver
- In your terminal window with the Homebrew package manager:
- 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.
![Firefox Firefox](/uploads/1/3/4/0/134067717/486157154.png)
Safari Webdriver Download
Additional Resources
Selenium Webdriver Download Java
Oh and if this article worked for you please consider sharing it or buying me coffee to say thanks.