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,710 points
62 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 in Selenium by Shashank
• 1,350 points
152 views
0 votes
1 answer
0 votes
1 answer

Selenium Alternatives: Is there a tool like Selenium for testing web pages but which does not involve coding.

I'm guessing you've tried Selenium IDE already. ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,590 points
57 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,050 points
258 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
626 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
253 views
0 votes
2 answers