AscentialTest Support Hub

IsPresent vs WaitUn…

 

Notifications

Clear all

IsPresent vs WaitUntilExists



1

Posts


1

Users


0

Reactions


41

Views

(@blesuer)
Member Admin

Joined: 4 months ago
Posts: 33

Topic starter
 

The two actions ‘IsPresent’ and ‘WaitUntilExists’ are sometimes assumed to be interchangeable but in fact, they are very different.

As you may know, AscentialTest takes snapshots continuously during test execution. Whenever AscentialTest anticipates a change in application state, a new snapshot is taken. Because WaitUntilExists is a synchronization action, it runs a loop and continues to check the state of the target object until the timeout expires or the object comes into existence.

In contrast, IsPresent returns true or false based on the current snapshot. It does not wait for an object to display. IsPresent should never be used to test for the existence of a top level window.



   

Quote

Share:

Can’t Find An Answer in the Forum?

Contact Our Team