Overview
Screenshot commands allow you to capture visual snapshots of pages and elements.screenshot
Capture a screenshot of the page or a specific element.| Parameter | Description |
|---|---|
selector | Optional: Element selector to screenshot. If omitted, captures viewport. |
path | Optional: File path to save screenshot. If omitted, saves to temp directory. |
| Option | Description |
|---|---|
—full, -f | Capture full page (scrolls to capture entire page) |
—annotate | Overlay numbered labels on interactive elements |
Basic Screenshots
Examples:Annotated Screenshots
Annotated screenshots overlay numbered labels[1], [2], etc. on interactive elements. Each label corresponds to a ref (@e1, @e2) that you can use for interactions.
Examples:
Full Page Screenshots
Capture the entire page by scrolling and stitching screenshots together. Examples:| Parameter | Description |
|---|---|
path | File path to save PDF |
Workflow Examples
Visual Testing
Documentation Generation
Multimodal AI Workflow
Error Reporting
Element Screenshots
Responsive Testing
Image Formats
Screenshots are automatically saved in the format based on file extension:| Extension | Format |
|---|---|
.png | PNG (default, lossless) |
.jpg, .jpeg | JPEG (lossy, smaller file size) |
.webp | WebP (modern, efficient) |
Environment Variables
Control screenshot behavior with environment variables:| Variable | Description |
|---|---|
AGENT_BROWSER_ANNOTATE | Enable annotated screenshots by default |