render_html_screenshot
Render HTML content to PNG screenshots using Playwright. Supports full-page, element selector, and wait for images with optional hiding of fixed elements.
Instructions
Playwright (chromium) screenshot of a local/remote HTML page or an element selector. Waits for images to load, can hide fixed/sticky elements, supports full-page or selector-local captures.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Remote URL to render. | |
| html | No | Raw HTML string to render. | |
| inline | No | Also return the PNG inline as base64. | |
| outPath | Yes | Where to save the PNG. | |
| fullPage | No | ||
| htmlPath | No | Path to a local HTML file. | |
| selector | No | CSS selector for a partial (element) screenshot. | |
| settleMs | No | ||
| hideFixed | No | Hide position:fixed/sticky elements before shooting. | |
| initScript | No | JS run before page scripts (addInitScript) — e.g. seed localStorage/state so one HTML file can render multiple states. | |
| viewportWidth | No | ||
| waitForImages | No | ||
| viewportHeight | No |