Skip to main content

app_press_tap

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Press and tap: one finger holds an element while a second finger taps another, and the first lifts only after the second has. The gesture behind "hold this, tap that" — adding to a selection, a modifier held while choosing. Give hold and tap as refs or locators, resolved before anything touches the screen, or x1,y1 (hold) and x2,y2 (tap). It reports that the gesture was delivered: what it means is the app's decision, so call app_map again to see it. Android 15 and earlier only: on iOS, XCTest adds a zero-length touch at the second finger's target at the start of the gesture, so WebDriverAgent refuses; on Android 16 and later UiAutomator2 gives the second finger its own down time, Android rejects the rest of the gesture and then every injected touch, so it refuses too. Discards the refs from the last app_map.

Changes the device, the app or the session: readOnlyHint is false.

Arguments​

NameTypeRequiredWhat it is
devicestringDevice serial to target, e.g. "emulator-5554". Omit when only one device is running.
driverstring: uiautomator2, uiautomator, wdaDriver 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).
holdstringA ref or locator for what the first finger holds.
lead_msintegerHow long the first finger rests before the second taps, in milliseconds. Defaults to 300 — under Android's 500ms long-press timeout, so the held element does not open its own menu first. Raise it for an app that wants a long press.
tapstringA ref or locator for what the second finger taps.
x1integerHeld point, X in device pixels. Instead of hold.
x2integerTapped point, X in device pixels. Instead of tap.
y1integerHeld point, Y in device pixels.
y2integerTapped point, Y in device pixels.

Examples​

Each is the arguments of a tools/call request; the first is shown whole.

Hold one thing and tap another​

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "app_press_tap",
"arguments": {
"hold": "@e3",
"tap": "@e7"
}
}
}

On a device​

mobium press-tap 'label=Hold zone' 'label=Act zone' on an Android 15 emulator

mobium press-tap 'label=Hold zone' 'label=Act zone' on an Android 15 emulator