'"WebDriverError: No active session with ID" when refreshing page after timeout of 30 minutes
I am creating an automated test to verify that the login screen is displayed after 30 minutes inactivity. I start by logging in to the application and then just wait 31 minutes. Then I refresh the page and I expect that the login screen is shown.
At the moment I get the error: "WebDriverError: No active session with ID ........." when performing the refresh of the page.
I use protractor, chrome webdriver and Javascript.
The line of code that I use is "browser.refresh();"
I tried to wait less then 30 minutes and then the refreshing of the browser works fine, but then I am not able to verify that the login screen is present.
Is there a way to set the (session)timeout of the webdriver for this specific test?
Solution 1:[1]
Friendly suggestion, don't automate this test. A test that has to wait 30 minutes to check something is not a good candidate for automation. This is better left as a manual test, and that's ok. We don't have to automate everything, nor should we.
That said, this answer is a few years old but suggests that you should be able to make this work with -timeout and/or -sessionTimeout
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | tehbeardedone |
