How to download Google Chrome Driver?
How to download Google Chrome Driver?
In this tutorial, we will learn the steps involved to download Google Chrome Driver for Selenium web automation. We need to download the compatible Google Chrome driver for the Chrome version that is used for Web application testing.
Steps to Download
Navigate to the following URL:
- https://chromedriver.chromium.org/
Pick the suitable version of the driver. By default choose the latest version. If you do so, update the Google Chrome browser that is used for testing.
Pick the OS and download the driver.
For Windows 64-bit version:
Pick the Stable Channel.
Download the file: chromedriver-win64.zip
Extract the zip archive and copy the chromedriver.exe into your automation project folder.
In the automation setup, we may need to specify the location of the driver.
System.setProperty("webdriver.chrome.driver", "<path_to_driver>/chromedriver.exe");
Common Errors
If the driver is old, you would encounter the following error and the tests would be skipped.
org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 87 Current browser version is 89.0.4389.90 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe Build info: version: '4.0.0-alpha-7', revision: 'de8579b6d5'