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
58 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
119 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
48 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
144 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
536 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
134 views
0 votes
2 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.