Tap Element
android_tap_elementLocate a UI element by selector (text, resource id, class, etc.) and tap its center, with automatic wait for visibility up to 5 seconds. More reliable than coordinate taps for dynamic layouts.
Instructions
Find a UI element by selector and tap its center. More reliable than coordinate taps for dynamic layouts. Waits for the element to appear (default 5s).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Match by exact visible text | |
| index | No | Which match to tap when multiple elements match (0-based). Defaults to 0. | |
| device | No | Device id (serial or host:port). Optional -- when omitted, uses ANDROID_MCP_DEVICE env or auto-selects the connected device (physical devices preferred over emulators). | |
| timeout | No | Max seconds to wait for the element. Defaults to 5. | |
| className | No | Match by class name, e.g. 'android.widget.Button' or just 'Button' | |
| resourceId | No | Match by resource id. Short ids like 'btn_login' are auto-expanded using the foreground app package | |
| contentDesc | No | Match by accessibility label / content description (substring, case-insensitive) | |
| textContains | No | Match by substring of visible text (case-insensitive) |