Selenium Chrome Driver Download For Mac

Posted on

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:

Selenium Chromedriver Download For Mac

For

In this blog, we’ve explored how you can download Selenium ChromeDriver and run test scripts both on Windows and Mac OS. As Google Chrome’s popularity rises, so does the need to find automated browser testing of your web application on the Chrome browser. To perform Selenium test automation, you need a ChromeDriver to access the browser. This video shows how to configure Chromedriver for selenium web driver on MAC and Windows. 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. If you want you can add a specific path here and you can move the chromedriver to this folder but as you see, /usr/local/bin folder is defined as a path by default. Now, go to your downloads folder, find the chromedrivermac64.zip file and unpack it.You will see the chromedriver executable file.

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.
  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!
SeleniumDownload chrome driver for selenium

After running your tests, if your PATH isn’t set up correctly you get this helpful message:

Latest Chrome Driver For Selenium

Selenium Chrome Driver Download For Mac

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

Additional Resources:

Oh and if this article worked for you please consider sharing it:

Or buying me coffee.

Download Chrome Driver For Mac

Selenium

To deal with this issue please delete TriggeredReset entry from Chrome registry as mentioned below:

  1. Open a run box by pressing Windows key ⊞+R:

  2. Type regedit and press OK, Registry Editor will open.

  3. There is a setting in the registry that's causing it. In the registry it's under: KEY_CURRENT_USERSoftwareGoogleChromeTriggeredReset

  4. Delete the TriggeredReset folder (the whole folder which contains 3 files) and then close regedit.

  5. Try running you test again.

chrome profile selenium, Note: Your default chrome profile would contain a lot of bookmarks, extensions, theme, cookies etc. Selenium may fail to load it. So as per the best practices create a new chrome profile for your @Test and store/save/configure within the profile the required data. To use the customized Chrome Profile: Note: Your default chrome profile would contain a lot of bookmarks, extensions, theme, cookies etc. Selenium may fail to load it. So as per the best practices create a new chrome profile for your @Test and store/save/configure within the profile the required data. To use the customized Chrome Profile: