Saturday, January 3, 2015

Running Selenium Webdriver tests on Google Chrome browser

Few months back i had added the support to execute tests on Google Chrome browser in my github project , so i thought to write it down how you can do the same if needed in your project.

3 Simple steps to add Google Chrome support in Selenium Webdriver project:
  1. Download the ChromeDriver.exe , you can download the latest version from for your target operating system.[download url may change, you can google latest if it changes]
  2. Extract the chromedriver.exe from the downloaded zip, and place in your project resources folder.
    Add Chromedriver.exe
  3. Now, go to the Driver file where you are initializing the ChromeDriver and add the below code line to initialize the ChromeDriver.

System.setProperty("", <full system path of the chromedriver.exe. Example: c:\tests\resources\chromedriver.exe>);
WebDriver driver = new ChromeDriver();

Tip : you can use the "System.getProperty("user.dir");" to get the current working directory and then append the path to chromedriver.exe


You can also view the complete code changes for your reference at

No comments:

AWS Certified Solutions Architect Associate - AWS Introduction - Questions

All the Best !!! Show Result !! Try Again !! ×