What is System.setProperty() in selenium?
Question
What is System.setProperty() in selenium?
Answer
The setProperty method requires two parameters, property name, and value.
System.setProperty(""propertyName"", ""value"");
As the name suggests, it is used to set properties to the browser. The propertyName indicates the name of the browser-specific driver and the value points to the path to that browser driver.
ex: System.setProperty(""webdriver.chrome.driver"", ""E://chromedriver.exe"");
This will initialise Chrome browser and later it will be launched by WebDriver reference