You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation of IsNotVisible is effectively !IsVisible. This has an issue, namely that IsVisible has some logic wherein it waits webdriver.timeouts.implicitlywait long to see if the element becomes visible.
As such, even if the element in question never exists, an IsNotVisible matcher takes a long time to resolve.
Noticed this was slowing down our test suite dramatically.
It's actually remarkably difficult to work out a way to implement IsNotVisible such that it is not affected by this implicit wait, because for instance driver#findElements also uses this implicit wait if it finds no elements.
Is there a way to work around this for now, and could this be resolved? The ideal behaviour would be that if an element is not visible at the start of the query, no waiting is done, and otherwise we wait only as long as it takes for the element to stop being visible.
It is easy to replicate this issue, just set webdriver.timeouts.implicitlywait =10000 for example, and then wait for a non existent element to not be visibile, observe it waits 10s
The text was updated successfully, but these errors were encountered:
This can't be avoided, because as soon as you reference an element, the timeout will kick in. However, you can prefix the call with withTimeoutOf(Duration.ZERO), e.g. withTimeoutOf(Duration.ZERO).findElement("#button").isNotVisible()
The implementation of IsNotVisible is effectively !IsVisible. This has an issue, namely that IsVisible has some logic wherein it waits webdriver.timeouts.implicitlywait long to see if the element becomes visible.
As such, even if the element in question never exists, an IsNotVisible matcher takes a long time to resolve.
Noticed this was slowing down our test suite dramatically.
It's actually remarkably difficult to work out a way to implement IsNotVisible such that it is not affected by this implicit wait, because for instance driver#findElements also uses this implicit wait if it finds no elements.
Is there a way to work around this for now, and could this be resolved? The ideal behaviour would be that if an element is not visible at the start of the query, no waiting is done, and otherwise we wait only as long as it takes for the element to stop being visible.
It is easy to replicate this issue, just set webdriver.timeouts.implicitlywait =10000 for example, and then wait for a non existent element to not be visibile, observe it waits 10s
The text was updated successfully, but these errors were encountered: