Understanding System.setProperty while Setting the Drivers.

setProperty, as the name says has two attributes which are – “System.setProperty(“propertyName”, “value”)”. It implies that it sets the system property ‘propertyName' to have the value 'value'.

While testing with Selenium, you will make use of the setProperty method because the browser doesn’t have a built-in server to run the automation code. In this case, you will need a Chrome/IE/Gecko driver server for communicating your Selenium code to the browser.

In simple words, to set the path of the driver for the respective browser you will need the system.setProperty.

Design a site like this with WordPress.com
Get started