What does system setProperty do?
System.setProperty(“webdriver.chrome.driver”, “/chromedriver.exe”); driver = new ChromeDriver();
When you run the above code, it will launch a Google Chrome using the Chrome Driver, with the system.setproperty method handling the driver’s initialization. This must be the first line of code in your Selenium script to be executed before any test method to initialise the driver. That’s the way things work. If you want to use the Firefox browser with the Gecko driver, you can do so.