Skip to main content
All gesture methods take coordinates as tuples (x, y) or Point/BBox objects.

Taps

phone.tap((x, y))                              # Single tap
phone.tap("the blue button")                   # Tap by description (vision AI)
phone.double_tap((x, y))                       # Double tap
phone.tap_and_hold((x, y), duration_ms=1000)   # Long press
MethodParametersDescription
tap(target)target: coordinates or description stringSingle tap
double_tap(point)point: coordinatesDouble tap
tap_and_hold(point, duration_ms=1000)point: coordinates, duration_ms: hold timeLong press

Swipes

phone.flick((x, y), direction="up")                    # Quick swipe
phone.pan((x, y), direction="up", duration_ms=500)     # Slow scroll
MethodParametersDescription
flick(point, direction)direction: "up", "down", "left", "right"Quick swipe gesture
pan(point, direction, duration_ms=500)Same as flick + duration_msControlled scroll

Drag

phone.drag(from_point, to_point)                           # Simple drag
phone.hold_and_drag(from_point, to_point, hold_duration_ms=500)  # Hold then drag
MethodParametersDescription
drag(from_point, to_point)Start and end coordinatesDrag between points
hold_and_drag(from_point, to_point, hold_duration_ms=500)Same + hold durationHold before dragging (for reordering)

Pinch

phone.pinch((x, y), action="pinch_out")  # Zoom in
phone.pinch((x, y), action="pinch_in")   # Zoom out
phone.pinch((x, y), action="rotate_cw")  # Rotate clockwise
phone.pinch((x, y), action="rotate_ccw") # Rotate counter-clockwise
ActionEffect
pinch_outZoom in (fingers apart)
pinch_inZoom out (fingers together)
rotate_cwRotate clockwise
rotate_ccwRotate counter-clockwise