page. screenshot() does the job in two lines for a local capture or a test assertion. The friction arrives later: full-page shots that get clipped by sticky headers, Chromium installation issues in CI, and the long tail of keeping a browser fleet running in production.
Source: [Dev.to](https://dev.to/grabbit/how-to-take-screenshots-in-playwright-full-page-elements-ci-11gc)