System.setProperty("webdriver.chrome.driver","") meaning?

0 votes

Can someone help me with the meaning of

System.setProperty("webdriver.chrome.driver","path to chromedriver.exe");
Webdriver driver = new ChromeDriver();

Thank you in advance

Jan 8, 2019 in Selenium by Anjali
• 2,950 points
20,100 views

1 answer to this question.

0 votes

The meaning of the statement are almost similar to what it sounds:-

System.setProperty("webdriver.chrome.driver","path to chromedriver.exe");
// This basically sets the system property to value named webdriver.chrome.driver and the path is mentioned to get the chrome driver
Webdriver driver = new ChromeDriver();
// This is basically used to create an instance of the chrome driver.

Hope you got the meaning of the statements.

answered Jan 8, 2019 by Nabarupa
How can I get this to work? Whether I am using Eclipse in Linux on my company's computer, or IntelliJ in Windows on my personal PC at home, I use the following commands:

        BaseUtil base = new BaseUtil() // class BaseUtil contains variable "public WebDriver Driver;"
        System.setProperty("webdriver.firefox.marionette", "C:\\geckodriver.exe"); // geckodriver.exe is in my C: directory
        base.Driver = new FirefoxDriver();
        // The browser window opens but the following lines are not executed before the program crashes with the error:
        // org.openqa.selenium.WebDriverException: Timed out waiting 45 seconds for Firefox to start.
        System.out.println("I navigate to the login page.\n");
        base.Driver.navigate().to("http://www.executeautomation.com/demosite/Login.html");

Hey @Rich, could you please specify which versions of SeleniumGeckoDriver, and Firefox you are using?

Related Questions In Selenium

0 votes
1 answer

Setting the webdriver.chrome.driver system property

When u use Selenium 3.x you should ...READ MORE

answered Jun 26, 2018 in Selenium by Samarpit
• 5,890 points
11,271 views
0 votes
1 answer

getting java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property

Hi Sivaranjani, to resolve your issue, Driver path ...READ MORE

answered Sep 3, 2019 in Selenium by Abha
• 27,930 points
2,454 views
0 votes
2 answers

Latest Version of Chrome Driver for Selenium Webdriver

Hi, you can get the latest version ...READ MORE

answered Aug 28, 2019 in Selenium by Abha
• 27,930 points
2,606 views
0 votes
2 answers

webdriver.ie.driver System Property setting driver executable

System.setProperty("webdriver.chrome.driver","C:\\Users\\vthaduri\\workspace\\LDCSuite\\IEDriverServer.exe"); your miss take is webdriver.chrome.driver but, we have ...READ MORE

answered Apr 24, 2019 in Selenium by anonymous
5,456 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,510 points
3,499 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,505 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,582 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
2,824 views