This document guides you with the steps to resolve the
This error occurs when a session is idle for more than the set timeout, which is generally 90 seconds. This happens as BrowserStack by default waits for the timeout duration for additional steps or commands to run, if BrowserStack does not receive any command during that time, the session is stopped, changing the session status to
TIMEOUT on the Automate dashboard.
Following are some mechanisms to avoid this error:
BrowserStack does not know when you are done with all the steps in your Selenium test. The
driver.quit Selenium command, helps us identify that all the steps of the Automate test are finished and the test is completed. You should call the
driver.quit command after all the steps in your test script.
Refer to the below code snippets on how to call the
driver.quit command in your test script:
BrowserStack triggers the
BROWSERSTACK_IDLE_TIMEOUT error when a session is left idle for more than 90 seconds. The
browserstack.idleTimeout capability helps us increase the timeout value in case the web page takes longer than 90 seconds to open. You can set a timeout value from
300 seconds. The default value is
Your test script can run into exceptions, resulting in the
driver.quit command not getting fired. To handle such exceptions, you should use a
try…catch block. A general approach to use
try…catch in your test script:
driver.quitcommand at end of your test script.
Configure timeout in your test frameworks.
For example, you may have configured a timeout of 30 seconds in your test framework. A request to open a web page may take longer than 30 seconds, in such a case the test would get timed out.
You can refer to the below links for configuring timeout in your framework:
The above steps should help you resolve the
BROWSERSTACK_IDLE_TIMEOUT error. If you need additional help, please contact our Support team.
Contact our Support team for immediate help while we work on improving our docs.