Wait for Desktop Element
Pauses until a desktop element appears or disappears, then continues immediately. Polls inside the robot, so it reacts within a fraction of a second; the same wait built from Check Element Exists in a loop costs a round trip per look. Returns true when the state arrived, false when the timeout ran out first (Windows only).
Category: Desktop Application Automation · Group: Desktop · Activity name: WaitForDesktopElement
Example
outputVariable = WaitForDesktopElement("<xPath>", state="appears", timeout=15000, pollInterval=200, checkOrphanedElements=False)
Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| XPath | string | Yes | XPath expression that identifies the target element. | |
| Element State | string | appears | Whether to wait for the element to show up or to go away. One of: appears, disappears. | |
| Timeout (ms) | integer | 15000 | How long to keep looking before giving up and returning false. Default 15000. | |
| Poll interval (ms) | integer | 200 | How long to pause between looks. Default 200; anything under 50 is raised to it. | |
| Check orphaned elements | boolean | False | When the element is not found by its XPath, scan the parent window's area for elements detached from the UI Automation tree. Slower; enable only for windows known to orphan their elements. |
Outputs
| Name | Type | Description |
|---|---|---|
| outputVariable | boolean | Specifies the name of the variable that will store whether the state arrived before the timeout. |