ios_tap_by_label
PREFERRED way to tap on iOS: find a UI element by its accessibility label and tap it in one call via the automation session. No coordinate math, and it works on zero-area elements (e.g. bottom-tab labels) where ios_tap(x,y) would miss. Use this before falling back to ios_tap with raw coordinates. If the element is off-screen it auto-scrolls to bring it into view first (disable with autoScroll:false). On no match, returns similar labels (incl. off-screen) to retry with. Requires an active iOS automation session (auto-starts if needed).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | iOS device UDID | |
| label | Yes | Accessibility label or visible text of the element to tap | |
| match | No | How to match `label`. Default "contains" — strict, and the only modes that act without interpretation. "fuzzy" tolerates typos and word-order drift, and is tried ONLY after strict finds nothing; it REFUSES when two candidates are too close rather than guessing between them (e.g. "Sign" vs Sign In / Sign Out), and reports which attribute it matched. | |
| autoScroll | No | Scroll the element into view if off-screen before tapping (default: true) |