• Register
0 votes

Problem :

Facing following Selenium Webdriver error
the path to the driver executable must be set by the webdriver.chrome.driver system property
6 5 3
6,930 points

2 Answers

0 votes

Solution :

The path of your Chrome Driver is incorrect. And you must set the property before WebDriver initialisation as follows.

System.setProperty("webdriver.chrome.driver","D:\\List_of_Jar\\chromedriver.exe") ;

WebDriver wd =new ChromeDriver(); 

String baseUrl = "https://www.google.com"; 


9 7 4
38,600 points
0 votes

The path to the driver executable must be set by the webdriver.chrome.driver system properly.


If you are experienced this error, then error means that you have not told your system where to find your driver executable. Unlike when using the Firefox WebDriver you need to download a driver executable that is specific for chrome and builds the connections part between your Java Selenium program and the chrome Webbrowser.


To fix this problem you have to follow these steps;

  • Download the latest Chrome Driver for your operating system. If you are working with windows then choose “chromedriver_win32.zip”
  • Extract the content of the zip file to any place of your computer, that you will remember later.
  • After replacing the location of the chromedriver.exe with the specific location on your computer. Then add the following code to your Selenium program before creating a new instance of ChromeDriver.

That is the solution to the above problem.

Code sample:

A whole working code sample can look like this;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;


 * @author Nils Schuette via frontendtest.org


public class ChromeDriverTest {


             * @param args

             * @throws InterruptedException


            public static void main(String





11 5 1
3,890 points

Related questions

0 votes
1 answer 9 views
I am finding a program that will help me to handle multiple windows in Selenium Webdriver.
asked Oct 5 Daniel Anderson 4k points
0 votes
1 answer 90 views
Problem : I am trying to learn the Selenium by myself. But now my Sendkeys is not working. Can anybody please help me to fix my issue. My code is as below: WebElement uname = driver.findElement(By.xpath("//*[@id='username']"));      uname.sendKeys("123456"); Below is the error: Exception in ... ip: '', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_161'
asked Feb 14 mphil 2.3k points
0 votes
1 answer 14 views
Problem: I am very new to Selenium and Java both. I am trying to select and get the dropdown value in a Selenium WebDriver using the Java. The HTML Code is as below: <select class="form_input_select bx-def-font" name="Sex[0]"> <option value="Male">Man</option> < ... it only shows _Others Kindly help me to solve above issue. I am unable to fix above issue after working on it for more than 3 days.
asked Jul 9 Raphael Pacheco 4.9k points
0 votes
1 answer 54 views
Problem : I am new to Chown. I am still learning it. I tried to set the EACCESS for the npm and then I ran the Chown command in the terminal to change the owner permission but currently i am totally stuck in following "Sudo : /usr/bin/sudo must be owned by uid 0 and have the setuid bit set" I am using ubuntu14.04 LTS. How to fix this error?
asked Feb 27 mphil 2.3k points