-1

I am trying to launch chrome using selenium webdriver. I have set the property with the correct path and still, I am getting the following error. The path to the driver executable must be set by the webdriver.chrome.driver system property

enter image description here

surajs1n
  • 1,493
  • 6
  • 23
  • 34

1 Answers1

2

You are missing .exe in your path, use the below path

"C:\\Users\\PRATIKSHA\\DOWNLOADS\\chromedriver.exe"

and you need to set property for chromedriver webdriver.chrome.driver

System.setProperty("webdriver.chrome.driver", "C:\\Users\\PRATIKSHA\\DOWNLOADS\\chromedriver.exe");

See the sample code from chromedriver doc here

CodeIt
  • 3,492
  • 3
  • 26
  • 37