This page documents how to start using ChromeDriver for testing your website on desktop (Windows/Mac/Linux).
Jun 28, 2012 So you’ll need to download and install Selenium on your Mac. June 2020 - this article is out of date - checkout my updated post on Automated Testing. Download Chromedriver to your Mac. Head over to the Chromedriver Project page and download the latest package. You then need to unzip the package and then copy the file to /usr/bin. I want to use selenium with chromedriver on Mac,but I have some troubles on it. I download the chromedriver from ChromeDriver - WebDriver for Chrome But I don't want to put it to PATH.So I do this.
You can also read Getting Started with Android or Getting Started with ChromeOS
Setup
ChromeDriver is a separate executable that Selenium WebDriver uses to control Chrome. It is maintained by the Chromium team with help from WebDriver contributors. If you are unfamiliar with Selenium WebDriver, you should check out the Selenium site.
Follow these steps to setup your tests for running with ChromeDriver:
- Ensure Chromium/Google Chrome is installed in a recognized location
ChromeDriver expects you to have Chrome installed in the default location for your platform. You can also force ChromeDriver to use a custom location by setting a special capability.
- Download the ChromeDriver binary for your platform under the downloads section of this site
![Download Selenium Chromedriver For Mac Download Selenium Chromedriver For Mac](/uploads/1/3/4/3/134303791/170461708.png)
- Help WebDriver find the downloaded ChromeDriver executable
- include the ChromeDriver location in your PATH environment variable
- (Java only) specify its location via the webdriver.chrome.driver system property (see sample below)
- (Python only) include the path to ChromeDriver when instantiating webdriver.Chrome (see sample below)
Sample test
Java:
Python:
Update Chromedriver Mac
Controlling ChromeDriver's lifetime
The ChromeDriver class starts the ChromeDriver server process at creation and terminates it when quit is called. This can waste a significant amount of time for large test suites where a ChromeDriver instance is created per test. There are two options to remedy this:
Download Selenium Chromedriver
1. Use the ChromeDriverService. This is available for most languages and allows you to start/stop the ChromeDriver server yourself. See here for a Java example (with JUnit 4):
Python:
Chromedriver Mac Download
2. Start the ChromeDriver server separately before running your tests, and connect to it using the Remote WebDriver.
Terminal:
Java:
Selenium is great for automated testing of web-apps and I’ve been using the Selenium IDE Firefox extension for a few months now.
For completeness of automated testing for web apps you need to do this in a number of different browsers which Selenium IDE doesn’t do. So you’ll need to download and install Selenium on your Mac.
June 2020 - this article is out of date - checkout my updated post on Automated Testing
Download Chromedriver to your Mac
Selenium Chromedriver Path
Head over to the Chromedriver Project page and download the latest package.
Download adobe reader dc for mac. You then need to unzip the package and then copy the file to /usr/bin
Install Chromedriver Mac
This is a hidden system folder so the easy way to get to this file is
- Open another finder window
- From the Go menu select Go To Folder
- Type /usr/bin and press enter
Now drag n drop the Chromedriver file from your Download folder to this directory. You’ll be prompted for you Admin password.
Finally, I suggest you restart your computer as the next step didn’t work when I tried it.
Basic Test Case for Chromedriver and Selenium
If you’ve already followed my guide to setup Selenium via Python then this will look familiar
![Selenium Selenium](/uploads/1/3/4/3/134303791/900255693.png)
Chromedriver For Selenium 64 Bit
Open a terminal window and type the following, pressing enter at the end of each line
After a few seconds, if all is well a new instance of Chrome will open
To finish the test just type
driver.get('http://www.damien.co')
To exit Python from your open Terminal, press ctrl+z
Chrome for mac download dmg. Google Chrome for Mac is a Internet Browser that combines a minimal design with sophisticated technology to make the Web faster, safer, and easier. Use one box for everything-type in the address bar and get suggestions for both search and Web pages. Thumbnails of your top sites let you access your favorite pages instantly with lightning speed from any new tab. Desktop shortcuts allow you to.