Click

Click an element using a snapshot ref, CSS selector, XPath selector, text selector, or semantic selector.

terminal
pinchtab click e5
curl -X POST http://localhost:9867/action \  -H "Content-Type: application/json" \  -d '{"kind":"click","ref":"e5"}'
Response
OK

CLI Flags

FlagDescription
--cssCSS selector instead of ref
--wait-navWait for navigation after click
--snapOutput interactive snapshot after click
--snap-diffOutput snapshot diff after click
--textOutput page text after click
--dialog-actionAuto-handle JS dialog: accept or dismiss
--dialog-textPrompt response text (with --dialog-action accept)
--x, --yClick at specific coordinates
--humanizeUse humanized bezier+jitter input path (overrides instance config)
--mode dom|dispatchBroad low-level escape hatch for click delivery. Omit --mode for the normal click path, use dom for element.click(), or dispatch for synthetic click events on the target
--jsonFull JSON response
--tabTarget specific tab

Examples

terminal
pinchtab click e5                       # Click by refpinchtab click "#login"                 # Click by CSSpinchtab click "text:Submit"            # Click by textpinchtab click e5 --snap                # Click and show new snapshotpinchtab click e5 --wait-nav            # Click and wait for navigationpinchtab click e5 --dialog-action accept  # Auto-accept alert/confirmpinchtab click e5 --mode dom             # Activate target directly despite occlusionpinchtab click e5 --mode dispatch        # Dispatch click events on target despite occlusionpinchtab click --x 100 --y 200           # Click at coordinates
pinchtab click e5                       # Click by refpinchtab click "#login"                 # Click by CSSpinchtab click "text:Submit"            # Click by textpinchtab click e5 --snap                # Click and show new snapshotpinchtab click e5 --wait-nav            # Click and wait for navigationpinchtab click e5 --dialog-action accept  # Auto-accept alert/confirmpinchtab click e5 --mode dom             # Activate target directly despite occlusionpinchtab click e5 --mode dispatch        # Dispatch click events on target despite occlusionpinchtab click --x 100 --y 200           # Click at coordinates

Notes

  • Element refs come from /snapshot
  • Refs for iframe descendants can be clicked directly without frame switch
  • Selector lookup is limited to current frame scope (default: main)
  • Use /frame before selector-based iframe actions
  • Missing selectors fail immediately; use pinchtab wait first for dynamic UI (see commands.md)
  • The API also accepts selector field: {"kind":"click","selector":"#login"}
  • Click behavior works like this: omit mode for the normal click path, use mode:"dom" for element.click(), or mode:"dispatch" for synthetic click events.
  • Treat mode as a broad, low-level escape hatch for click delivery. Occlusion bypass is the common case, but it can also help with pages that need a non-default click path.
  • mode and humanize:true are mutually exclusive.
  • To opt a click into the slower humanized path for a page that needs it, pass humanize:true in the action JSON or set instanceDefaults.humanize:true.