How to use implicit wait and explicit wait together?

767 Views Asked by At

In my framework we are using singleton driver and we are mainly using explicit wait. As documentation suggests we shouldn't use both together but at some points because of synchronization issues I need to use implicit wait.

In that case I found a workaround, I add implicit wait to my driver, then at the end of this test I just create brand new driver.

But I would like to know if there is any other way to do that ?

1

There are 1 best solutions below

0
On

As per the documentation:

Warning: Do not mix implicit and explicit waits. Doing so can cause unpredictable wait times. For example, setting an implicit wait of 10 seconds and an explicit wait of 15 seconds could cause a timeout to occur after 20 seconds.