# Built-in browser commands Use a snapshot-interact-re-snapshot loop: ```text ORCA goto --url https://example.com --json ORCA snapshot --json ORCA click --element @e3 --json ORCA snapshot --json ``` Common commands: ```text ORCA goto --url --json ORCA back --json ORCA reload --json ORCA snapshot --json ORCA screenshot --json ORCA full-screenshot --json ORCA pdf --json ORCA click --element --json ORCA fill --element --value --json ORCA type --input --json ORCA select --element --value --json ORCA check --element --json ORCA scroll --direction down --amount 1000 --json ORCA hover --element --json ORCA focus --element --json ORCA keypress --key Enter --json ORCA upload --element --files --json ORCA wait --text --json ORCA wait --url --json ORCA wait --selector --json ORCA wait --load networkidle --json ORCA eval --expression --json ORCA tab list --json ORCA tab create --url --json ORCA tab switch --index --json ORCA tab close --index --json ORCA cookie get --json ORCA capture start --json ORCA console --limit 50 --json ORCA network --limit 50 --json ORCA exec --command "help" --json ``` Browser rules: - Re-snapshot after navigation, tab switches, clicks that change the page, and any `browser_stale_ref`. - Refs like `@e1` are assigned by `snapshot`, scoped to one tab, and invalidated by navigation or tab switch. - Browser commands default to the current worktree and its active tab. Use `--worktree all` only intentionally. - For concurrent browser work, run `ORCA tab list --json`, read `tabs[].browserPageId`, and pass `--page ` on later commands. - Use typed tab commands (`ORCA tab list/create/close/switch`), not `ORCA exec --command "tab ..."`, so Orca keeps UI state synchronized. - Prefer `wait --text`, `--url`, `--selector`, or `--load` after async page changes instead of bare timeouts. - Anything not listed above goes through `ORCA exec --command ""`. - If `fill` or `type` fails on a custom input, try `ORCA focus --element @e1 --json` then `ORCA inserttext --text "text" --json`. - A client-hosted page renders in the paired desktop's browser engine, so every command against it needs that desktop online and returns `browser_host_unavailable` while it is closed, asleep, or disconnected. Server-hosted pages run with no desktop attached; prefer them for long or unattended automation. Common recoveries: - `browser_no_tab`: open a tab with `ORCA tab create --url --json`. - `browser_stale_ref`: run `ORCA snapshot --json` and retry with fresh refs. - `browser_tab_not_found`: run `ORCA tab list --json` before switching or closing. - `browser_host_unavailable`: the desktop hosting the page is offline. Bring it back, or recreate the page with server placement if the work must outlive the desktop session.