Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To capture a dynamic website accurately, first bring the page to the state you want—wait for JavaScript-rendered content, perform any needed clicks or scrolling, then capture the viewport, full page, or a specific element. Playwright and Puppeteer both support these screenshot types; the right choice depends on the automation setup you already use.

Choose what the screenshot needs to show

A viewport capture records what is visible at that moment. A full-page capture extends to the document’s scrollable extent. An element capture targets a component such as a chart, form, or header. Playwright documents viewport, full-page, and element screenshots; Puppeteer also supports page and element captures.

Decide the target before writing the capture step. If the image must show a tab, menu, accordion, hover state, or other interaction-dependent content, reproduce that state first. A full-page option does not by itself guarantee that every item revealed by scrolling or interaction has loaded.

Take a one-off screenshot manually

For a single capture, use your browser’s screenshot feature or developer tools if available. The exact controls vary by browser and version, so consult the documentation for the browser you are using rather than relying on a keystroke or menu path that may not apply to your installation. Manual capture is convenient, but it is less suitable when you need repeatable captures or a consistent page state.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Capture dynamic pages with Playwright

Use Playwright when it is already part of your browser automation. Navigate to the page, wait for a meaningful readiness condition, and then capture the desired area.

await page.goto('https://example.com');
await page.locator('main').waitFor();
await page.screenshot({ path: 'page.png', fullPage: true });

Replace main with a selector or condition that makes sense for the page. The presence of a main element is not proof that all data, images, or client-side updates have finished rendering. If the page uses lazy loading, scroll through the relevant sections and verify the resulting image.

Capture a specific element

For a focused image, capture the locator rather than the whole document:

await page.locator('.header').screenshot({ path: 'header.png' });

Use a selector that identifies the intended component on your page. Playwright’s screenshot guidance covers full-page and element screenshots, along with output to a file or buffer: Playwright screenshots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

Make repeated captures more consistent

Playwright’s screenshot API accepts a stylesheet through its style option. You can use it to hide or alter elements that change between runs, such as an animation or timestamp, when a stable comparison is the goal. Be explicit about this in your workflow: changing the rendered page can make the image differ from what a visitor actually sees. See the Playwright Page API for current options.

Capture dynamic pages with Puppeteer

Puppeteer’s documented example waits for networkidle2 before taking a page screenshot:

await page.goto('https://news.ycombinator.com', {
  waitUntil: 'networkidle2',
});
await page.screenshot({ path: 'hn.png' });

This is an example wait condition, not a universal signal that every page is finished. Sites may keep network requests open or update content after the network becomes quiet. For reliable captures, wait for the particular content or state that matters to your image.

Capture an element or a region

Puppeteer supports element screenshots and can scroll a hidden element into view before capturing it. Its screenshot options also include full-page capture, clipping to a region, image type, quality, and background omission. Consult the current Puppeteer screenshots guide and ScreenshotOptions API for option details and version-specific behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Get scroll-triggered content into the capture

Some pages load images or other content only as the user scrolls. If the target appears only after scrolling, move down the page in steps, pause for the expected content to load, and check the output. Do not assume that requesting a full-page screenshot will trigger every lazy-loaded asset or interaction-dependent state; the cited screenshot APIs do not promise that behavior.

  1. Identify the section or content that is missing. Note whether it depends on scrolling, a click, a hover, a tab, or a delayed update.
  2. Reproduce the needed state. Scroll through the relevant area or perform the interaction before capturing.
  3. Wait for a specific result. Prefer a condition tied to the content you need over an arbitrary pause when your automation can identify that result.
  4. Capture and inspect the image. Confirm the target is present; adjust the wait or scroll steps if it is not.

Choose between Playwright and Puppeteer

The documentation establishes supported capabilities, not a speed, reliability, or overall quality winner. Prefer the tool that fits your existing automation language and browser workflow, then check whether its screenshot options cover the output you need.

Need Playwright Puppeteer
Full-page screenshot fullPage: true in screenshot options fullPage option
Element screenshot Locator screenshot ElementHandle screenshot; hidden elements are scrolled into view
Screenshot styling Screenshot style option can hide or alter dynamic elements Not established in the cited documentation
Other documented options Buffer output and an image-processing workflow Clipping, image type, quality, and background omission

Troubleshoot missing or inconsistent output

The screenshot is blank or shows a loading state

The capture may be happening before the relevant page content is ready. Wait for a page-specific selector or state, then capture again. A generic navigation wait is not necessarily sufficient for client-side rendering.

Content that appears after scrolling is missing

Scroll through the relevant sections in steps, pause for the content to load, and inspect the output. A full-page option describes the capture extent; it does not guarantee that every lazy-loaded item has been activated.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

The required state depends on an interaction

Perform the click, hover, tab change, or other action before taking the screenshot. Wait for the resulting content to appear rather than capturing immediately after the action.

Repeated screenshots differ

Identify the changing element first. In Playwright, a screenshot stylesheet can hide or modify dynamic elements, but document the visual change so that a stabilized image is not mistaken for the untouched page.

The screenshot is larger than needed

Capture the specific element, or use Puppeteer’s documented clipping option to restrict the image to a region. A smaller target can also make the desired content easier to inspect.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. Its capture workflow can accept cookie or consent banners as a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use this cURL example for a one-call capture. Replace YOUR_API_KEY with your access key and change the target URL as needed. See the ScreenshotNeo API documentation for request options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
  • Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing; response headers identify the page verdict and whether the request was billed.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients.
  • The Free plan includes 1,000 screenshots per month without a card. Paid plans start at $5 for 3,000 screenshots; every feature is available on every plan.

Sign up for ScreenshotNeo and get 1,000 free screenshots a month with no card.

Frequently Asked Questions

Does full-page capture load every lazy image?

Not necessarily. Scroll through the relevant content, allow it to load, and inspect the captured image.

Is Puppeteer’s networkidle2 wait always enough?

No. It is a documented example wait, not a guarantee that all client-side changes or content have finished.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.