-
Notifications
You must be signed in to change notification settings - Fork 827
Open
Description
Describe the bug
Unable to use cdp mode
Followed the command in README but it doesn't seem to recognize --cdp argument, also no mention of this flag in the -h command
To Reproduce
Any command with --cdp ${port} argument
$ agent-browser --cdp 9222 open about:blank
Unknown command: 9222
Output of -h
$ agent-browser -h
agent-browser - fast browser automation CLI for AI agents
Usage: agent-browser <command> [args] [options]
Core Commands:
open <url> Navigate to URL
click <sel> Click element (or @ref)
dblclick <sel> Double-click element
type <sel> <text> Type into element
fill <sel> <text> Clear and fill
press <key> Press key (Enter, Tab, Control+a)
hover <sel> Hover element
focus <sel> Focus element
check <sel> Check checkbox
uncheck <sel> Uncheck checkbox
select <sel> <val> Select dropdown option
drag <src> <dst> Drag and drop
upload <sel> <files...> Upload files
scroll <dir> [px] Scroll (up/down/left/right)
scrollintoview <sel> Scroll element into view
wait <sel|ms> Wait for element or time
screenshot [path] Take screenshot
pdf <path> Save as PDF
snapshot Accessibility tree with refs (for AI)
eval <js> Run JavaScript
close Close browser
Navigation:
back Go back
forward Go forward
reload Reload page
Get Info: agent-browser get <what> [selector]
text, html, value, attr <name>, title, url, count, box
Check State: agent-browser is <what> <selector>
visible, enabled, checked
Find Elements: agent-browser find <locator> <value> <action> [text]
role, text, label, placeholder, alt, title, testid, first, last, nth
Mouse: agent-browser mouse <action> [args]
move <x> <y>, down [btn], up [btn], wheel <dy> [dx]
Browser Settings: agent-browser set <setting> [value]
viewport <w> <h>, device <name>, geo <lat> <lng>
offline [on|off], headers <json>, credentials <user> <pass>
media [dark|light] [reduced-motion]
Network: agent-browser network <action>
route <url> [--abort|--body <json>]
unroute [url]
requests [--clear] [--filter <pattern>]
Storage:
cookies [get|set|clear] Manage cookies
storage <local|session> Manage web storage
Tabs:
tab [new|list|close|<n>] Manage tabs
Debug:
trace start|stop [path] Record trace
console [--clear] View console logs
errors [--clear] View page errors
highlight <sel> Highlight element
Setup:
install Install browser binaries
install --with-deps Also install system dependencies (Linux)
Snapshot Options:
-i, --interactive Only interactive elements
-c, --compact Remove empty structural elements
-d, --depth <n> Limit tree depth
-s, --selector <sel> Scope to CSS selector
Options:
--session <name> Isolated session (or AGENT_BROWSER_SESSION env)
--json JSON output
--full, -f Full page screenshot
--headed Show browser window (not headless)
--debug Debug output
Examples:
agent-browser open example.com
agent-browser snapshot -i # Interactive elements only
agent-browser click @e2 # Click by ref from snapshot
agent-browser fill @e3 "test@example.com"
agent-browser find role button click --name Submit
agent-browser get text @e1
agent-browser screenshot --full
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels