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.
Chrome Browser does not comes to focus on MAC. Is there any work around available for that?
To bring focus i use to maximize mac chrome browser .. So would suggest to try this might be it will also work for you
Good, follow the steps, get the chromedriver worked. Thanks.
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!