Occasionally, when you are running your tests, things will go wrong and you will lose connection with the browser instance you are driving. When you lose connection to the browser instance, SessionNotFoundException will be thrown.
This is a similar error to UnreachableBrowserException but in this case, you have a much smaller list of things to check since you know you were successfully talking to the RemoteWebDriver instance for a while.
The following problems usually cause this error:
- You inadvertently quit the driver instance
- The browser crashed