

Exception in thread "main" : The path to the driver executable must be set by the system property for more information, see.

If the path is not defined or if the path provided is wrong, we will get an exception like below when running our tests. tProperty(“”, “/path/to/binary/geckodriver”) tProperty(“”, “/path/to/binary/chromedriver”) exe files like chromedriver.exe and geckodriver.exe in case of windows environment or binary files like chromedriver and geckodriver in case of Linux distributions, which allows Selenium WebDriver to handle browsers in order to run our selenium webdriver automation scripts on Chrome and Firefox browsers (applicable for other browsers as well).Īnd, also, we need to set the path of these files in our script, like below, or we need to add the location to the classpath. We all know that we need to have browser drivers.
