IllegalStateException is the child class of RuntimeException and hence it is an unchecked exception. This exception is rise explicitly by programmer or by the API developer to indicate that a method has been invoked at the wrong time.
What is an IllegalStateException in Java?
public class IllegalStateException extends RuntimeException. Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation.
What is IllegalStateException selenium?
An IllegalStateException is thrown while working with Chrome browser if the chromedriver.exe file path is set incorrectly in the method System. ... Once this executable file is downloaded, it has to be extracted. Then its path should be copied and added as a parameter to the System. setProperty method.