page.screenshot
Capture the rendered page as an image for visual inspection, selecting viewport, full-page, element, or sheet layout that keeps long pages readable. Stored artifacts support later review.
Instructions
See the rendered page. Returns the image for visual inspection plus a stored artifact. mode: viewport, full_page, element (with a locator), or sheet: the whole page cut into side-by-side columns that fit one screen, so a long page stays readable. Prefer sheet for reviewing a whole page; add width:320 for a phone or width:1280 for a desktop without touching the viewport.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "page.screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nth | No | Zero-based index when the locator matches several elements. | |
| ref | No | Snapshot ref (eNN) from page.snapshot. | |
| mode | No | ||
| text | No | Visible text of the element. | |
| label | No | Tag for this capture, e.g. "onboarding-repro". Filter later with artifact.list(label:). | |
| width | No | mode:sheet. Lay the page out at this CSS width for the capture, then put the viewport back. Under 600 emulates a phone. | |
| xpath | No | XPath expression. | |
| aspect | No | mode:sheet. Shape to fit, like "16:10" or "4:3". Default 16:10. | |
| format | No | ||
| height | No | mode:sheet. Viewport height to go with width. Default 800 for a phone, 900 otherwise. | |
| settle | No | Wait for running CSS animations and transitions to finish first, so entrance animations are not captured mid-flight. | |
| columns | No | mode:sheet. Columns to cut the page into, up to 12. Default: whatever fits aspect. | |
| quality | No | 1-100, for jpeg/webp. | |
| frame_id | No | Frame to search within; see page.list_frames. | |
| selector | No | CSS selector; pierces shadow DOM. | |
| highlight | No | CSS selector to box in the image. One-shot: the overlay is cleared after capture, unlike page.highlight. | |
| max_width | No | Downscale the capture to at most this many CSS pixels wide. Cuts payload on wide or full-page shots. With mode:sheet it caps the whole sheet, default 2000. | |
| save_path | No | ||
| target_id | No | Target handle (tgt_*). Omit for the active page. | |
| browser_id | No | Browser handle (br_*). Omit to use the only running browser, or auto-launch one. | |
| timeout_ms | No | Give up after this long. Default 15000; a hung capture reports what the target was doing rather than stalling. | |
| return_image | No | Default true. Set false to store only. | |
| backend_node_id | No | CDP backendNodeId, e.g. from inspector.pick. | |
| settle_timeout_ms | No | Cap on the settle wait. Default 2000. | |
| trigger_lazy_content | No | Scroll the full page once before a full_page capture, so IntersectionObserver-driven content has rendered. |