Screenshot
screenshotCapture a web page as a base64-encoded image using a headless browser, with options for viewport size, full-page capture, waiting for a CSS selector, and dismissing cookie banners.
Instructions
Capture a screenshot of a web page using a headless browser. Returns an image as base64 (PNG or JPEG). Supports custom viewport size, full-page capture, waiting for a CSS selector, and dismissing cookie consent banners.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to capture | |
| width | No | Viewport width in pixels | |
| format | No | Image format: png or jpeg | png |
| height | No | Viewport height in pixels | |
| quality | No | Image quality (1-100), only used for jpeg format | |
| fullPage | No | Capture the full scrollable page | |
| dismissCookies | No | If true, attempt to dismiss common cookie consent banners before capturing | |
| waitForSelector | No | CSS selector to wait for before capturing. Puppeteer will wait until this element is visible. |