How to setup Chrome driver with Selenium on MacOS

0 votes
How to setup Chrome driver with Selenium on MacOS?
Jul 18, 2019 in Selenium by Nushrat
78,460 views

4 answers to this question.

0 votes

Hey Nushrat, setting up Chrome driver with Selenium is an easy task for Windows OS, but in MacOS you have follow this procedure:

  1. Download the Chrome drivers for MAC from here: http://chromedriver.storage.googleapis.com/index.html?path=76.0.3809.68/

  2. Now, in MAC navigate to one directory called /usr/local/:

  3. In the above folder, check if bin folder is there or not. If not, create a bin folder and copy the driver in /usr/local/bin :

And that's it. you have configured the chrome driver for Selenium. The good thing here is that we don’t have to remember the path variable like webdriver.chrome.driver in Windows.

For further understanding, you can refer to the Selenium Certification.

answered Jul 18, 2019 by Anvi
• 14,150 points
+1 vote
Hi Nushrat,

In MacOs follow the steps and u will get the chrome set up ::

First and foremost check if any Antivirus is running. If so, Disable it.

Second check the version of your chrome and make it latest to be in ur pc.

Third get the chrome driver for the version of chrome  u are using (like i used version 84 so got chrome driver for same version)and put the .exe file in the /usr/local/bin folder.

If u cant find the /usr/local/bin then go to the terminal type:: chflags nohidden ~/usr

Go to finder press CMD+Shift_G and go to the /usr/local/bin path and now paste the chrome driver .exe file.

Now it shall surely run the webdriver.Chrome()

All The Best!
answered Aug 9, 2020 by Shipra
Hi @Shipra, thank you for your contribution to the Edureka Community.

Register/Sign up on the community to gain points for further contributions. You may ask questions, answer, upvote, and downvote an answer. Each of these would fetch you points and you could be among the top contributors and win exciting merchandise from Edureka.

Cheers!
0 votes

System PATH Setup

  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
answered Dec 16, 2020 by Roshni
• 10,520 points
0 votes

Installing ChromeDriver on macOS

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 cask install 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. 

answered Dec 16, 2020 by Gitika
• 65,890 points

Related Questions In Selenium

+1 vote
1 answer

How to handle notifications in Python with Selenium (Chrome WebDriver)

Below will help you: You can disable the ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
14,331 views
0 votes
1 answer

How to resolve Pycharm Referenced Error with Import Selenium Web driver?

Below will help: Pycharm > Preferences > Project ...READ MORE

answered Jun 26, 2018 in Selenium by Samarpit
• 5,910 points
9,462 views
+1 vote
1 answer
0 votes
2 answers

How to save as PDF on Chrome using Selenium

Vaishanvi, Select  ID  selected dropdown or it ...READ MORE

answered Feb 22, 2020 in Selenium by Abdul
34,071 views
0 votes
1 answer

How to check if an image is displayed on web page while working with Selenium WebDriver?

I've come across a similar situation before, where the image ...READ MORE

answered May 10, 2019 in Selenium by Surya
• 970 points
7,836 views
0 votes
1 answer

How can I download Microsoft WebDriver/Edge Driver to use with Selenium?

Hi William, to download Microsoft Webdriver or ...READ MORE

answered Jul 15, 2019 in Selenium by Abha
• 28,140 points
40,629 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,455 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,017 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,133 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,810 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP