tap
Simulates finger touch input via CDP to fire touch, pointer, and click events; targets elements by CSS selector or viewport coordinates on mobile sessions.
Instructions
Tap in the session's active tab with a finger: real CDP touch input, so the page gets touch events, pointer events with pointerType "touch" and the click a tap makes. Use it on mobile sessions (open_browser_session with useMobileUA, which also makes the page see a touch screen) for anything a phone user would tap; click sends mouse input instead. Pass a CSS selector (or plain words, resolved by Jev as for click) to tap the first match's center after waiting up to timeout for it, or both x and y for viewport coordinates. A tap can submit forms or trigger purchases, like a real user's. Returns a confirmation naming what was tapped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Horizontal viewport coordinate in CSS pixels, used with `y` when no selector is given. | |
| y | No | Vertical viewport coordinate in CSS pixels, used with `x` when no selector is given. | |
| timeout | No | Milliseconds to wait for `selector` to appear. Default 5000. | |
| selector | No | CSS selector of the element to tap; the first match is used. Or describe it in plain words, as for click. | |
| sessionId | Yes | The id returned by open_browser_session. Errors if no open session has it. |