app_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.
Changes the device, the app or the session: readOnlyHint is false.
Arguments
| Name | Type | Required | What it is |
|---|---|---|---|
device | string | Device serial to target, e.g. "emulator-5554". Omit when only one device is running. | |
driver | string: uiautomator2, uiautomator, wda | Driver to use: "uiautomator2" (default for Android; fast, installs a server APK on first use), "uiautomator" (Android, installs nothing, slower, cannot type), or "wda" (WebDriverAgent: iOS simulators and iPhones). | |
duration_ms | integer | Hold time; default 800. Default 800. | |
target | string | A ref from app_map ("@e5") or a locator. | |
x | integer | X in device pixels, instead of target. | |
y | integer | Y in device pixels, instead of target. |
Examples
Each is the arguments of a tools/call request; the first is shown whole.
Press and hold for two seconds
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "app_long_press",
"arguments": {
"target": "@e4",
"duration_ms": 2000
}
}
}
On a device
| Before | After |
|---|---|
![]() | ![]() |
mobium long-press testid=pressTarget on an Android 15 emulator

