In our previous article on Selenium Tutorial, you learned how to download selenium webdriver and junit jar files. In this article, we will provide the detailed steps on how you can download ChromeDriver.
Are you trying to download Selenium Webdriver for Chrome and want to set it up from scratch?
Did you know that ChromeDriver now comes up packaged with the latest version of Selenium, and that you don’t need to download it separately?
Click here to follow our latest and most upto Selenium Webdriver Tutorial Guide
Before we start with the download process, let us try to get some basic understanding on what ChromeDriver is and why do we need it.
What is ChromeDriver?
You know that selenium is a tool that basically interacts with browsers to test your web applications. In our previous article, we had mentioned that you can use selenium webdriver to open some url on a browser and interact with webpage elements like buttons, links, text boxes etc.
But selenium cannot do all these tasks on its own. It needs some help from the browser side as well, to perform all these tasks. So, in that sense, chrome driver is what helps selenium perform these actions on Chrome browser. In more technical terms, ChromeDriver is a standalone server which implements WebDriver’s wire protocol for Chrome.
Like Chrome Driver, are there more standalone servers for other browsers as well?
Yes. Just like chrome driver, there are multiple other standalone servers as well. Some popular ones are GeckoDriver for firefox, EdgeDriver for Microsoft Edge, InternerExplorerDriver for IE, SafariDriver for Safari browser and so on.
You will need to use these drivers when you want to run your automation scripts on their corresponding browsers.
Why have we selected Chrome Driver for this tutorial and not others?
This question can be rephrased like this – Why are we using chrome browser to automate our test cases? There are two main reasons for this:
- Chrome has the highest market share worldwide. So, it makes sense to work on the browser which majority of the people are using. We have given below a comparison chart of different browsers.
- Selenium works better in Chrome than other browsers, especially Firefox. When I started working on Selenium automation in 2012 Firefox was kind of the default browser to go to when people wanted to automate test scripts. But now a lot of people prefer to use chrome to write automation scripts.
Source: StatCounter Global Stats – Browser Market Share
Let us now check out the steps to download ChromeDriver.
Steps to download ChromeDriver latest version (version 115 or above)
Follow the steps given below to download the latest version of chrome driver for selenium –
1. Open Chrome for Testing availability page – https://googlechromelabs.github.io/chrome-for-testing/
2. On this page, you will see different versions of Stable, Dev, Beta and Canary releases
3. Go to Stable version, look for ChromeDriver for win32 or win64 (based on your Windows OS being 32-bit or 64-bit)
4. Open the URL and open it a new tab, chromedriver-win64.zip will now be downloaded on your machine.
5. Once you download the zip file, unzip it to retrieve chromedriver.exe
How to download previous versions of ChromeDriver
In the previous section, we covered the steps on how you can download the latest version of Chrome Driver. But what if you want to download an older version (like couple of versions before the latest version).
For example, from the above screenshots, you can see that the latest version of ChromeDriver is 121. But what if you want to download ChromeDriver 120, or ChromeDriver 119. Follow the steps given below to download these older versions of ChromeDriver.exe
1. Open a new browser tab and then open known good versions with downloads url – https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json
This JSON file contains all the versions of ChromeDriver starting from 113. It includes the download link for all the platforms as well such as ChromeDriver 64-bit exe, ChromeDriver 32-bit exe, ChromeDriver Linux64, ChromeDrive Mac Arm64 and x64
2. To download ChromeDriver 120, search for 120. in the JSON file. In you know the exact version, then look for that one. Else you can scroll down to find the last search results with 120. and then look for url against win32, win64 etc.
3. Copy this url. Open it in a new tab. That particular ChromeDriver zip will now be downloaded on your machine.
Steps to download ChromeDriver (version 114 or below)
If you want to download more older versions (like version 114 or below), then follow the steps given below –
1. Open ChromeDriver page – https://chromedriver.chromium.org/home
2. This page provides the latest as well as older ChromeDriver binaries
3. Click on Downloads link. Based on the version of Chrome browser you have on your machine, click on the corresponding ChromeDriver version
4. Assuming you clicked on the link for ChromeDriver 114.5735.90, you will be navigated to ChromeDriver download page which contains ChromeDriver for Mac, Windows and Linux operating systems.
5. Click on chromedriver_win32.zip to download ChromeDriver for Windows.
6. Once you download the zip file, unzip it to retrieve chromedriver.exe
With this, we complete the download process for ChromeDriver. In our next article, we will focus on creating a selenium project in Eclipse, where we will use this chrome driver and the jar files that we downloaded in the previous article
Visit our Selenium Tutorial page for the step by step process to run Selenium test scripts.
[…] following our Selenium Tutorial series from the beginning, you would recollect that we have already downloaded Chrome Driver. Refer back to that article and copy the location where you have saved […]