What is setProperty Selenium?
As the name implies, setProperty has two attributes: “System.setProperty(“propertyName”, “value”)” . It means that it sets the value of the system property ‘propertyName’ to ‘value’.
In Selenium Before launch the browser session using WebDriver, for each driver object we need to set the System path to the respective driver exe file. So we use
System.setProperty(“webdriver.chrome.driver”, “/chromedriver.exe”);
same can be used to set for firefox ,IE browsers also .