tap
Tap or long-press screen elements by visible label, control number, or pixel coordinates to perform actions on an Android phone via adb.
Instructions
Tap, or long-press, something on the phone screen.
Args:
target: The number from read_screen (for example 7), or the visible
label of the control ("Send", "Sign in"). A label is matched against
the control's text and description, and the best match wins. The
screen is re-read first, so the target is resolved against what is
on screen now; the reply names exactly what was tapped.
x: Horizontal pixel coordinate. Use only when nothing on screen is
nameable, such as a spot on a map or photo.
y: Vertical pixel coordinate, used together with x.
long_press: Hold instead of tapping, for context menus and drag handles.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Horizontal pixel coordinate, for tapping a point instead of a control. | |
| y | No | Vertical pixel coordinate, for tapping a point instead of a control. | |
| target | No | Which control, by its number from read_screen or by its visible label. | |
| long_press | No | Hold instead of tapping, for a context menu or a drag handle. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |