Home >Java >javaTutorial >How to Resolve \'java.lang.IllegalStateException\' When Setting Chrome Driver Path?
The specified exception, "java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property," indicates an improper setting for the Chrome driver executable path.
To resolve this issue, the path to the Chrome driver executable must be accurately configured as a system property. Specifically:
System.setProperty("webdriver.chrome.driver", "C:\Users\sravani\Desktop\chromedriver.exe");
Note: The executable's name (chromedriver.exe) should be included in the path, and the extension (.exe) should be retained for Windows systems.
The above is the detailed content of How to Resolve \'java.lang.IllegalStateException\' When Setting Chrome Driver Path?. For more information, please follow other related articles on the PHP Chinese website!