Ui Find Element
ui_find_elementGUI automation — control a native app's interface. Finds an element (button, field, menu…) in an app's accessibility tree by role and/or label. Scope with app_bundle_id or window_id. Returns an opaque element_ref (usable by ui_click / ui_get_element this session) plus role, label, bounds, focused, and enabled only when the app publishes AXEnabled (otherwise enabled_unknown: true, which does NOT mean disabled). found=false when the app is reachable but no element matches; app_not_found is an explicit error. Requires Accessibility permission.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | AX role, e.g. AXButton, AXMenuItem, AXTextField. | |
| index | No | Which match to return if several (default 0). | |
| label | No | AX title/description to match. | |
| match | No | Default contains. | |
| window_id | No | Alternatively scope by a window_id from list_windows. | |
| app_bundle_id | No | Scope the search to this app. |