This skill provides comprehensive browser automation capabilities through OpenClaw's managed browser system. It enables safe, isolated web interaction with deterministic UI control.
# 1. Open a page
openclaw browser --browser-profile openclaw open https://example.com
# 2. Take a snapshot to see interactive elements
openclaw browser --browser-profile openclaw snapshot --interactive
# 3. Perform actions using references from snapshot
openclaw browser --browser-profile openclaw click e12
openclaw browser --browser-profile openclaw type i23 "search term" --submit
openclaw: Isolated managed browser (recommended for automation)chrome: Chrome extension relay (for controlling existing Chrome tabs)openclaw, work, remote simultaneouslyTwo approaches for reliable UI interaction:
--format ai): Numeric references like [1], [2]--interactive): Semantic references like [ref=e12]e=button, b=link, i=input, s=select--frameopen, navigate, closeclick, type, press, hover, drag, selectfill (structured form data), file uploadhighlight, trace, errors, requestsBrowser settings are managed in ~/.openclaw/openclaw.json. Key options:
{
"browser": {
"enabled": true,
"defaultProfile": "openclaw",
"profiles": {
"openclaw": { "cdpPort": 18800 },
"work": { "cdpPort": 18801 },
"remote": { "cdpUrl": "http://10.0.0.42:9222" }
}
}
}
See configuration.md for complete configuration guide.
# Get page content
openclaw browser --browser-profile openclaw open https://news-site.com
openclaw browser --browser-profile openclaw snapshot --interactive --compact
# Fill out a form
openclaw browser --browser-profile openclaw open https://form-site.com
openclaw browser --browser-profile openclaw snapshot --interactive
openclaw browser --browser-profile openclaw type i1 "John Doe"
openclaw browser --browser-profile openclaw type i2 "john@example.com"
openclaw browser --browser-profile openclaw click e5 # Submit button
# Navigate through multiple pages
openclaw browser --browser-profile openclaw open https://shop.com
openclaw browser --browser-profile openclaw wait --load networkidle
openclaw browser --browser-profile openclaw snapshot --interactive
openclaw browser --browser-profile openclaw click b12 # Product link
openclaw browser --browser-profile openclaw wait --load networkidle
openclaw browser --browser-profile openclaw click e8 # Add to cart
Connect to browsers on other machines:
"profiles": {
"remote-workstation": {
"cdpUrl": "http://192.168.1.100:9222",
"color": "#00AA00"
}
}
Use hosted Chromium:
"profiles": {
"browserless": {
"cdpUrl": "https://production-sfo.browserless.io?token=YOUR_TOKEN",
"color": "#00AA00"
}
}
Automatic routing to nodes with browser capability:
target="node" to force specific nodebrowser.evaluateEnabled=false--interactive snapshots for better reliability executablePath and permissionssnapshot --interactive to get current statehighlight to verify target locationerrors --clear to check JavaScript errorsrequests --filter api --clear to monitor networktrace start → reproduce issue → trace stop for deep debuggingbrowser_status.py: Check browser statusbrowser_snapshot.py: Take snapshots with optionsbrowser_action.py: Perform UI actionsprofiles.md: Profile management guidesnapshot-system.md: Complete snapshot referenceconfiguration.md: Full configuration guideexample-workflow.md: Complete workflow examples--interactive) for automationThis skill transforms OpenClaw into a powerful web automation platform while maintaining security and reliability through its snapshot-based, reference-driven approach.
共 1 个版本