npx playwright screenshot --full-page https://example.com shot.png

Category: Web App Development

npx playwright screenshot --full-page https://example.com shot.png

Capture a full-page screenshot with Playwright

Renders the page in a headless browser and saves a screenshot spanning the entire scrollable height, not just the viewport. The --full-page flag captures everything below the fold. Add --device 'iPhone 13' to emulate a phone viewport.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.