# How can I wait for an object to disappear?

# Problem

I need to wait until an object disappears.

### Context

My application has reports it generates, and it can take time. When a report is generating, an animated Please Wait image and text appears. Once the report is generated, the page loads and the Please Wait image and text goes away.

# Solution

### Option A

Wait until the object is no longer visible, but only wait for a maximum amount of time. Notice the not (!) negating the isVisible statement.

<table id="bkmrk-actionaccessorwait60"><colgroup><col></col><col></col></colgroup><tbody><tr><td>**Action**

</td><td>**Accessor**

</td></tr><tr><td>Wait

</td><td>60000,!(isVisible(paragraph("Please Wait")))

</td></tr></tbody></table>

### Option B

If you want to wait, as well as check something else while waiting, you could use .wasNotFound() in a While. Note: The Set Search Retries lowered to and then restored after the While completes.

<table id="bkmrk-actionaccessorset-se"><colgroup><col></col><col></col></colgroup><tbody><tr><td>**Action**

</td><td>**Accessor**

</td></tr><tr><td>Set Search Retries

</td><td>2

</td></tr><tr><td>While

</td><td>!(paragraph("Please Wait").wasNotFound())

</td></tr><tr><td>Wait

</td><td>1000

</td></tr><tr><td>End While

</td><td></td></tr><tr><td>Set Search Retries

</td><td>12

</td></tr></tbody></table>

---

Last updated: October 15, 2026

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>