TearDown always falls in RemoteDriver if test fails before

229 Views Asked by At

If my test fails and a session on RemoteDriver ends before or element is not founded and the session on selenoid(RemoteDriver) ends my tearDown fails too. How can I check current session if it not fail and I can use driver.quit() and how I can avoid this error when session end before tearDown.

log error

BeforeAfter config

1

There are 1 best solutions below

1
On

This error usually means you did not interact with browser more that specified with -timeout parameter (default is 1 minute) or sessionTimeout capability. Either check why you are having such long pauses between subsequent Selenium requests or increase timeout value e.g. to 2 minutes.