Waits until the object does not exist or until the timeout is reached. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached.
Using WaitForDisappearance directly after a find action will cause a "could not find object" error if the object has already disappeared. To prevent this error, you can use the WaitForChildDisappearance method on a parent, for example the main window or the desktop.
testObject.WaitForDisappearance([timeout])
Variable | Description |
---|---|
timeout | Optional: The maximum wait time in milliseconds. Integer. |