Browser Automation
Automate web browsers with AI assistance.
Overview
Cmdop provides browser automation powered by:
- Chrome DevTools Protocol
- AI-driven element detection
- Natural language commands
Start Browser Session
cmdop browser startWith options:
cmdop browser start --headless --profile defaultBrowser Flags
| Flag | Description |
|---|---|
--headless | Run without UI |
--profile | Use specific browser profile |
--proxy | Set proxy server |
--incognito | Private browsing mode |
Basic Commands
Navigation
cmdop browser navigate https://example.com
cmdop browser back
cmdop browser forward
cmdop browser refreshElement Interaction
# Click by selector
cmdop browser click "#submit-button"
# Click by text
cmdop browser click --text "Sign In"
# Type in input
cmdop browser type "#email" "[email protected]"Screenshots
cmdop browser screenshot
cmdop browser screenshot --full-page
cmdop browser screenshot --element "#main-content"AI-Powered Browsing
Use natural language with the AI chat:
cmdop chat --browsercmdop> go to amazon.com
cmdop> search for "mechanical keyboard"
cmdop> filter by 4 stars and above
cmdop> add the first result to cartScripted Automation
Create browser scripts:
# scrape-prices.yaml
name: Price Check
browser:
headless: true
steps:
- navigate: https://store.example.com
- wait: "#products-loaded"
- for_each:
selector: ".product-card"
do:
- extract:
name: ".product-name"
price: ".product-price"
- export: prices.jsonRun:
cmdop browser run scrape-prices.yamlCDP Access
Direct Chrome DevTools Protocol access:
# Get CDP endpoint
cmdop browser cdp-endpoint
# Returns: ws://localhost:9222/devtools/browser/...Connect with Playwright, Puppeteer, or other tools.
Profile Management
# List profiles
cmdop browser profiles list
# Create profile
cmdop browser profiles create work
# Delete profile
cmdop browser profiles delete old-profileCookie Management
# Export cookies
cmdop browser cookies export > cookies.json
# Import cookies
cmdop browser cookies import cookies.json
# Clear cookies
cmdop browser cookies clearUse Cases
- Web Scraping - Extract data from websites
- Testing - Automated UI testing
- Form Automation - Fill and submit forms
- Monitoring - Track website changes
- Screenshots - Capture web pages
Stop Browser
cmdop browser stop