Installing Chromedriver on MAC

ChromeDriver for Mac Machine

In this post i would show you how to download chromedriver for mac machine and will also see the installation of chromedriver on mac machine.Along with this,  we will see selenium webdriver script that will launch chrome browser on mac machine using Chromedriver.

So lets see the proper step by step way to perform installation of chromedriver for mac

Steps:

1- Open this link to download chromedriver

http://chromedriver.storage.googleapis.com/index.html

2-Download latest version of chromedriver for mac.

3- Unzip the file.

4- Copy the chromedriver for mac which is unzipped in step 3 and Open the Finder and click on Go, it will open a dropdown menu. Click on Go to Folder.

5- On Go To Folder windows pop up enter following path “/usr/local/bin”

6- Paste chromedriver for mac on above location.

7- Restart the machine and Open Eclipse and create one Java Class with name “ChromeDriverExample” and paste following code

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

// This is chromedriver for mac example.
public class ChromeDriverExample {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        
        WebDriver driver = null;
        
        driver = new ChromeDriver();
        
        driver.get("http://abodeqa.com");

    }

}

8- Now Code is ready and run above code as Java Application. Above code will call the chromedriver for mac to get connected with Chrome Browser On Mac Machine through Selenium WebDriver Binary.

9- Above code will launch chrome on mac machine and will open abodeqa.com in Chrome Browser On Mac Machine. This shows that we have setup the chromedriver for mac correctly.

Note:  If above code doesn’t launch the browser, In that case navigate to “/usr/local/bin” location using terminal and run this line of command on terminal

chmod +x chromedriver

Above command will give rights to Chromedriver For Mac to be called through WebDriver script.

So hope you have successfully configured Chromedriver For Mac machine correctly and if you want to learn the same on windows machine in that case click on this link to read the step by step procedure to Launch Chrome Browser Using WebDriver in Windows. 

Thanks and keep reading more articles.

Dwarika Dhish Mishra

My name is Dwarika Dhish Mishra, its just my name and I am trying to bring the worth of my name in to actions and wants to be the solution not the problem. I believe in spreading knowledge and happiness. More over I am fun loving person and like travelling a lot. By nature I am a tester and a solution maker. I believe in the tag line of http://ted.org “Idea worth spreading” . For the same, I have created this blog to bring more and more learning to tester fraternity through day to day learning in professional and personal life. All contents are the part of my learning and so are available for all..So please spread the contents as much as you can at your end so that it could reach to every needful people in testing fraternity. I am pretty happy that more and more people are showing interest to become the part your Abode QA blog and I think this is good sign for us all because more and more content would be before you to read and to cherish. You may write or call me at my Email id: dwarika1987@gmail.com Cell: 9999978609

You may also like...

6 Responses

  1. Shami says:

    Chrome Browser does not comes to focus on MAC. Is there any work around available for that?

  2. Alice says:

    Good, follow the steps, get the chromedriver worked. Thanks.

  3. Abhinav says:

    I followed the same steps. But when I tried to execute it show permission denied. I am logged in as a non-admin user to the Mac machine. Is that the problem? If yes any workaround!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.