Skip to main content

PressTap

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. These call app_press_tap.

PressTap​

func (d *Device) PressTap(ctx context.Context, hold, tap string) error

PressTap holds one element with a finger while a second finger taps another, and lifts the first only after the second. Both are resolved before anything is touched. It reports that the gesture was delivered; what it meant is the app's own state, so call Map again to see it. Android 15 and earlier only: on iOS XCTest adds a zero-length touch at the second finger's target when the gesture starts, and on Android 16 and later UiAutomator2's down times are rejected, so both refuse (ErrUnsupported).

Examples​

Hold one thing and tap another​

if err := dev.PressTap(ctx, "@e3", "@e7"); err != nil {
return err
}

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