ui_find_element
Locate a UI element by AutomationId, name, control type, or XPath. Prerequisite: run ui_get_window_tree to discover available elements.
Instructions
Find a UI element by AutomationId, name, control type, or XPath.
At least one search criterion must be provided. Use ui_get_window_tree first to discover available elements.
Args: automation_id: AutomationId property (most reliable for WPF) name: Element's Name/Title property control_type: Type like "Button", "TextBox", "MenuItem" root_id: Optional AutomationId to scope search to a subtree xpath: Optional XPath expression (FlaUI backend only)
Returns: Element info if found
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| xpath | No | ||
| root_id | No | ||
| control_type | No | ||
| automation_id | No |