page.long_press
Press and hold an element or point to trigger long-press menus, hold-to-confirm, or hold-to-record. Releases after a set duration or when a selector or text appears.
Instructions
Press and hold on an element or point: long-press menus, "press and hold" buttons, hold-to-confirm, hold-to-record. Holds for duration_ms, or until until_selector/until_text appears (or disappears with until_gone) and then lets go. Mouse holds creep by a pixel now and then as a resting hand does. release:false keeps holding so page.drag or page.pointer can continue.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "page.long_press"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | With y and no locator: press this viewport point (CSS px). | |
| y | No | ||
| nth | No | Zero-based index when the locator matches several elements. | |
| ref | No | Snapshot ref (eNN) from page.snapshot. | |
| seed | No | Seed for the human randomness, to repeat a gesture exactly. Every call reports the seed it used. | |
| text | No | Visible text of the element. | |
| human | No | Default true: curved path, slow-fast-slow speed, hand jitter, short pauses. false: straight, even, no pauses. | |
| input | No | Default auto: touch when touch emulation is on for the tab (device.preset), else mouse. | |
| xpath | No | XPath expression. | |
| button | No | ||
| verify | No | Watch for DOM mutations after the gesture. Default true. | |
| release | No | Default true. false: keep holding after duration_ms. | |
| frame_id | No | Frame to search within; see page.list_frames. | |
| selector | No | CSS selector; pierces shadow DOM. | |
| jitter_px | No | Hand wobble mid-path in CSS px. Default 1.5; 0 for a steady hand. Ends are always exact. | |
| modifiers | No | Keys held throughout, e.g. ["Shift"] or ["Alt"]. | |
| target_id | No | Target handle (tgt_*). Omit for the active page. | |
| verify_ms | No | How long to watch. Default 300. | |
| browser_id | No | Browser handle (br_*). Omit to use the only running browser, or auto-launch one. | |
| until_gone | No | Invert until_*: release once it is gone. | |
| until_text | No | Release as soon as this text is on the page. | |
| duration_ms | No | How long to hold. Default 800; with until_* it is the most it will wait (default 15000, max 120000). | |
| until_selector | No | Release as soon as this CSS selector matches. | |
| backend_node_id | No | CDP backendNodeId, e.g. from inspector.pick. |