long_press
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Press and hold an element or a point — the gesture that opens context menus and starts drag-and-drop. These call app_long_press.
long_press
def long_press(target: str | None=None, x: int | None=None, y: int | None=None, duration_ms: int=800) -> None
Press and hold an element or a point.
Examples
Press and hold for two seconds
device.long_press("@e4", duration_ms=2000)
On a device
| Before | After |
|---|---|
![]() | ![]() |
mobium long-press testid=pressTarget on an Android 15 emulator

