Of the 3 Touch methods, browser sessions serve 0, phone sessions 3 and computer sessions 0. A method marked not served answers StrategyUnavailable on that kind of session; check the handshake’s capabilities before relying on one.

Touch.tap

Browser: not served Phone: served Computer: not served Tap once at a point. In screen pixels: the phone’s frame, the space screenshots and Screen.observe boxes use.
{"id": 1, "method": "Touch.tap", "params": {"x": 640, "y": 360}}
ParamTypeRequiredDescription
xintegerYesX coordinate in screen pixels.
yintegerYesY coordinate in screen pixels.
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result: an empty object {}.

Touch.longPress

Browser: not served Phone: served Computer: not served Press and hold at a point for durationMs. In screen pixels: the phone’s frame, the space screenshots and Screen.observe boxes use.
{"id": 1, "method": "Touch.longPress", "params": {"x": 640, "y": 360, "durationMs": 800}}
ParamTypeRequiredDescription
xintegerYesX coordinate in screen pixels.
yintegerYesY coordinate in screen pixels.
durationMsintegerYesHow long to hold, in milliseconds.
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result: an empty object {}.

Touch.swipe

Browser: not served Phone: served Computer: not served Swipe from (x1, y1) to (x2, y2) over durationMs. In screen pixels: the phone’s frame, the space screenshots and Screen.observe boxes use.
{"id": 1, "method": "Touch.swipe", "params": {"x1": 540, "y1": 1600, "x2": 540, "y2": 600, "durationMs": 800}}
ParamTypeRequiredDescription
x1integerYesStart X in screen pixels.
y1integerYesStart Y in screen pixels.
x2integerYesEnd X in screen pixels.
y2integerYesEnd Y in screen pixels.
durationMsintegerYesHow long the swipe takes, in milliseconds.
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result: an empty object {}.