System.setProperty (String,String) is showing System is not applicable for the arguments

0 votes
System.setProperty("webdriver.chrome.driver","C:\Users\Sradha\Downloads\chromedriver.exe");

This is not accepting the above string. Can someone help?
Dec 26, 2018 in Selenium by Sradha
• 1,750 points
238 views

1 answer to this question.

0 votes

You are correct that it requires (String,String) the one that you have provided, / is considered as escape character. When you provide the path it contains / but in order for program to understand you must use //. 

Hence, instead of writing 

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

if you use 

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

This will work fine.

answered Dec 26, 2018 by Rashmi

Related Questions In Selenium

0 votes
2 answers

System.setProperty is not recogonized in Eclipse.

Try adding the selenium jar files to ...READ MORE

answered Feb 4, 2019 in Selenium by Shashank
• 1,370 points
1,508 views
0 votes
1 answer
0 votes
2 answers

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,520 points
3,750 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,732 views
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,890 points
2,726 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
3,069 views
+1 vote
2 answers
0 votes
1 answer