tap
Simulates real finger touch in the active browser tab to trigger touch, pointer, and click events on mobile sessions; use a selector or x/y coordinates instead of mouse clicks.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "tap"
}
}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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hit | No | What was at the clicked or tapped point. | |
| url | Yes | The page's URL after the action. | |
| title | Yes | The page's title after the action. | |
| dialog | No | An open dialog's text, if one is showing. | |
| changed | No | A field `type` filled that the page changed once focus left it (a date that reformats or reverts on blur), with both texts. | |
| focused | Yes | The element with keyboard focus, or "nothing". | |
| options | No | The options of a dropdown or list open after the action (the one the focused field controls, else any showing), up to 50: pick one with select_option or click. | |
| answered | No | The page's own dialogs (alert, confirm, prompt, "Leave site?") answered since the last action, each accepted. | |
| rejected | No | Fields the page rejected during the action, each with its message: the browser's own form check (a required field left empty), or the page marking them invalid. The form wasn't sent while any remain. | |
| navigated | Yes | Whether the URL changed. | |
| focusTrail | No | With press_key's `repeat`: the focused element after each press. |