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,760 points
2,135 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 5, 2019 in Selenium by Shashank
• 1,370 points
7,278 views
0 votes
0 answers
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,500 points
13,735 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

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

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,172 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,910 points
7,249 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 3, 2020 in Selenium by Sri
• 3,190 points
7,888 views
+1 vote
2 answers
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP