Wait Element
Waits for a UI element to appear or disappear within a specified timeout period.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Handle - The handle of the window containing the element.
- Window Selector - The selector for identifying the target window.
- Element Selector - The selector for identifying the target element.
Options
- Condition - The condition to wait for. Default is no action.
- To Appear - Wait for the element to appear
- To Disappear - Wait for the element to disappear
- Timeout - The maximum time (in seconds) to wait for the condition. Default is 30 seconds.
How It Works
The Wait Element node pauses execution until a specified UI element either appears or disappears. When executed, the node:
- Uses the Window Selector and Element Selector to identify the target element
- Based on the Condition option:
- To Appear: Continuously checks for the element's existence until it appears or timeout
- To Disappear: Continuously checks for the element's existence until it disappears or timeout
- Checks for the element every 0.5 seconds during the wait period
- Raises a TimeoutError if the condition is not met within the specified timeout
Requirements
- Both Window Selector and Element Selector are required to identify the target element
- Valid timeout value (positive integer)
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Window Selector or Element Selector
- No Condition selected
- Timeout exceeded while waiting for the element condition
- Element cannot be located due to accessibility issues
Usage Notes
- This node is useful for synchronizing automation with dynamic UI changes
- Use "To Appear" when waiting for elements that are created or shown after some operation
- Use "To Disappear" when waiting for elements that are removed or hidden after some operation
- The timeout value should be set appropriately based on expected UI response times
- This node helps prevent race conditions in automation workflows
- For elements that may temporarily disappear and reappear, consider using appropriate timeout values