tap_on_element
Tap any UI element on Android or iOS by text, test ID, or content description. Automatically locates the element and taps its center, with optional long press and post-tap screenshot verification.
Instructions
🥇 RECOMMENDED: Tap on a UI element by selector. Finds the element and taps its center automatically. Prefer over device_tap. If observing a log triggered by this tap, spawn the wait_for_log subagent BEFORE tapping. NOTE: text matching is exact — if an element renders with an emoji prefix (e.g. '🇫🇷 French A2'), passing 'French A2' will fail. Use get_semantic_hierarchy first to see the exact text, or use contentDescription/testId strategy instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verify | No | If true, capture and return a screenshot right after the tap — saves a separate get_viewport round-trip when you're about to check the result anyway. | |
| deviceId | Yes | ||
| duration | No | Optional duration in ms. If > 0, performs a long press. | |
| platform | Yes | ||
| selector | Yes | Text, testId, or content description to find | |
| strategy | Yes | How to find the element: 'text' (visible text), 'testId' (accessibility ID), or 'contentDescription' |