Not able to run WebDriver test with Google Chrome.

0 votes

So my code is working with Firefox, but it is not working with Chrome. The erros is apparently in this line itself:

WebDriver driver = new ChromeDriver();

And here is the error log report:

Failed tests: setUp(com.TEST): The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list
Apr 20, 2018 in Selenium by kappa3010
• 2,020 points
274 views

1 answer to this question.

0 votes

Firefox is just default browser for tests uptill v2. For doing it with Chrome, you have to use system.setProperty() method to specify the path where your ChromeDriver is present. First of all download the .exe from this link and then provide its path like below: https://sites.google.com/a/chromium.org/chromedriver/downloads

System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver.exe");
WebDriver driver = new ChromeDriver();
answered Apr 20, 2018 by king_kenny
• 3,610 points

Related Questions In Selenium

0 votes
1 answer

Can anyone help me that how to run Selenium WebDriver test cases in Chrome?

Download the executable driver from: ChromeDriver Download Before ...READ MORE

answered Mar 29, 2018 in Selenium by nsv999
• 5,070 points
208 views
0 votes
1 answer
0 votes
1 answer

Not able to set ChromeDriver to run a TestNG programm

You have not set the system properties ...READ MORE

answered Apr 19, 2018 in Selenium by Meci Matt
• 9,420 points
112 views
0 votes
1 answer

How to handle notifications in Python with Selenium (Chrome WebDriver)

Below will help you: You can disable the ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
2,087 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,070 points
437 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
788 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
431 views
+2 votes
1 answer

Not able to run in chrome

There is a very silly mistake in ...READ MORE

answered May 15, 2018 in Selenium by king_kenny
• 3,610 points
349 views
0 votes
1 answer

How to handle the popup of file upload in Windows OS with WebDriver?

The value of name locator has probably ...READ MORE

answered Apr 25, 2018 in Selenium by king_kenny
• 3,610 points
2,664 views