Browser Screenshots
Quick browser screenshots for debugging web applications
Quick Start
Take a screenshot in two commands - no code required:
Command Format
co browser help (e.g., go_to, take_screenshot, click), or do for the AI agentThe first command starts a background daemon owning one browser; every later command drives that same browser until you run co browser close.
Examples
Basic Screenshots
Save to Specific Path
Custom Viewport Sizes
There are no named device presets — pass explicit width/height pixels.
Common Viewport Sizes
There are no named presets — pass set_viewport width height with the pixel dimensions you want:
| Command | Roughly matches | Icon |
|---|---|---|
| set_viewport 390 844 | iPhone 14/15 | |
| set_viewport 360 800 | Common Android | |
| set_viewport 768 1024 | iPad | |
| set_viewport 1920 1080 | Full HD Desktop |
Complete Examples
Use Cases
Debug Local Development
Quick visual checks during development
Document Bugs
Capture visual proof of issues
Test Responsive Design
Verify layouts across viewport sizes
co browser go_to localhost:3000 co browser set_viewport 390 844 && co browser take_screenshot view-mobile.png co browser set_viewport 768 1024 && co browser take_screenshot view-tablet.png co browser set_viewport 1920 1080 && co browser take_screenshot view-desktop.png
CI/CD Integration
Automated visual testing
URL Handling
The command intelligently handles URLs:
Installation
Standard Installation
Browser automation is built on Patchright (a stealth-patched Playwright fork):
If no browser is found, Chromium is auto-installed per-user with no admin rights required (v1.2.1+).
Framework Examples
Next.js
FastAPI
Django
React Dev Server
Common Error Messages
Tips
Quick Debug
Just co browser go_to localhost:3000 && co browser take_screenshot for instant feedback
Organize Screenshots
Use descriptive absolute paths like /tmp/bugs/issue-123.png — the daemon resolves relative paths against its own working directory
Test Viewports
Use set_viewport width height before screenshotting — there are no named device presets
Discover Functions
Run co browser help to list every callable function and its arguments
Limitations
- •One browser window per daemon — close it before starting a differently-configured one
- •Relative paths resolve against the daemon's working directory, not your shell's current directory
- •Visible browser window by default (pass
--headlessto run without one) - •Screenshots save as PNG
For sophisticated flows, hand the browser to the AI agent with co browser do "...", or build an agent with the BrowserAutomation tool directly.
Summary
co browser gives you a persistent, scriptable browser from the shell. Call functions directly for deterministic steps, or hand the wheel to the AI agent with do "...". Perfect for debugging during development.
ConnectOnion