ios_find_element
Locate UI elements in iOS simulators using accessibility labels or values to obtain tap coordinates for automated testing, eliminating the need for screenshots.
Instructions
Find a UI element on iOS simulator by accessibility label or value. Returns element details including tap coordinates. Requires IDB (brew install idb-companion). Workflow: 1) wait_for_element, 2) find_element, 3) tap with returned coordinates. Prefer this over screenshots for button taps.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | Exact accessibility label match | |
| labelContains | No | Partial label match (case-insensitive) | |
| value | No | Exact accessibility value match | |
| valueContains | No | Partial value match (case-insensitive) | |
| type | No | Element type to match (e.g., 'Button', 'TextField') | |
| index | No | If multiple elements match, select the nth one (0-indexed, default: 0) | |
| udid | No | Optional simulator UDID. Uses booted simulator if not specified. |