Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesScroll the page to trigger each infinite-scroll batch, and wait for a page-specific signal that the new content has rendered before capturing it. Then use await page.screenshot({ path: 'full-page.png', fullPage: true }). The fullPage option captures the full scrollable page; it does not, by itself, guarantee that an infinite list has loaded to its end.
Why fullPage does not finish infinite scrolling
fullPage: true controls the screenshot area: it captures the full scrollable page instead of only the visible viewport. Infinite scrolling is separate behavior, triggered as the page is scrolled or when a control is used. Playwright’s screenshot documentation does not promise that taking a full-page screenshot will trigger every site’s lazy-loading or infinite-scroll requests. Scroll and verify the content first, then capture. Playwright Page API
As an Amazon Associate I earn from qualifying purchases.
Choose a completion signal tied to the page
Prefer evidence that the content you need has arrived and rendered. Useful signals include a matching successful API response, a new card or row, an updated item count, a loading indicator disappearing, or an end-of-list marker. If a request is involved, register the response wait before triggering the scroll or click so the request is not missed. Playwright documents waiting for matching responses and observable page conditions. Playwright Waiting
- Request completed: confirms the relevant response arrived, but pair it with a DOM check if the screenshot needs the rendered result.
- Item count increased: confirms new elements appeared; check for an end marker or another completion condition before stopping.
- Loading state ended: useful when the site exposes a stable loading indicator.
- End marker appeared: a strong stopping condition when the page provides one.
A fixed delay can be a fallback for a site with no better signal, but elapsed time alone does not establish that the intended batch loaded.
#1 Best Overall
Runnable Playwright example
Replace the URL, selectors, and response predicate with signals from the target site. This example scrolls the last rendered item into view, waits for the matching response and an increase in item count, and stops at an end marker or the configured batch limit.
const itemSelector = '[data-testid="result-card"]';
const lastItemSelector = '[data-testid="result-card"]:last-child';
const endMarkerSelector = '[data-testid="end-of-results"]';
const apiPath = '/api/results';
const maxBatches = 20;
await page.goto('https://example.com/results');
await page.locator(itemSelector).first().waitFor({ state: 'visible' });
for (let i = 0; i < maxBatches; i++) {
if (await page.locator(endMarkerSelector).isVisible().catch(() => false)) break;
const before = await page.locator(itemSelector).count();
const responsePromise = page.waitForResponse(response =>
response.url().includes(apiPath) && response.ok()
);
await page.locator(lastItemSelector).scrollIntoViewIfNeeded();
await responsePromise;
await page.waitForFunction(
({ selector, previousCount }) =>
document.querySelectorAll(selector).length > previousCount,
{ selector: itemSelector, previousCount: before }
);
}
await page.screenshot({ path: 'full-page.png', fullPage: true });
Install Playwright and configure the browser in your project before running this code. The example assumes each successful batch adds at least one matching item and that the API path identifies the request caused by scrolling. If the site uses a “Load more” button, click it instead of scrolling the last item. If it exposes no API request, remove the response wait and use a reliable DOM change, loading transition, or end marker. The maxBatches limit prevents an unbounded loop; choose a limit suitable for the page.
Rank #2
Why networkidle is not a general finish signal
Playwright defines networkidle as no network connections for at least 500 ms, and discourages using it to assess general test readiness. It measures network quiet, not whether a particular list reached its intended end. A page can be quiet between batches, or unrelated background traffic can continue after the content you need has rendered. Prefer a response, DOM change, loading-state transition, or end marker tied to the page. Playwright Page API
Capture and validate the result
After the page-specific stopping condition is met, capture the full scrollable page with fullPage: true. For a long feed, inspect the result to confirm that the final expected items appear and that the capture reflects the content state you intended. Infinite lists may have a documented end condition—or may continue indefinitely—so define what “complete” means for your use case, such as reaching an end marker or a known item count.
Keep visual comparisons reproducible
If you compare screenshots over time, keep the browser and capture environment consistent. Playwright notes that rendering can vary with host operating system, browser version, settings, hardware, power source, and headless mode. Its toHaveScreenshot() assertion waits until two consecutive page screenshots yield the same result before comparing them; this helps with screenshot stability but does not replace the page-specific loading checks above. Playwright Visual comparisons
Troubleshooting
The screenshot is short or misses later items
Cause: the page was captured before scrolling triggered the next batches, or before those batches rendered. Fix: scroll to the last item or use the page’s load control, then wait for an item-count change or another content-specific signal before capturing.
Rank #4
The response wait times out
Cause: the URL predicate does not match the actual request, scrolling did not trigger another batch, or the site uses a different loading mechanism. Fix: inspect the page’s requests and adjust the predicate; verify that the scroll target is valid; or replace the response wait with a stable DOM or loading-state condition.
The loop never reaches its end condition
Cause: the page has no detectable end marker, the selector is wrong, or content continues to load. Fix: use a known item count or the site’s documented completion rule where available, and retain a maximum-batch limit. Do not treat an arbitrary quiet period as proof that the feed is complete.
Visual diffs appear despite unchanged content
Cause: the rendering environment differs, or the page was captured at a different loading state. Fix: keep the browser environment consistent and wait for the same page-specific content conditions before each capture. Playwright Visual comparisons
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
For a one-call capture of a page, ScreenshotNeo is a website screenshot API and MCP server. It returns an image or PDF, but it does not replace this Playwright workflow when you need to drive a particular page through multiple infinite-scroll batches before capture.
See the ScreenshotNeo documentation for request options. Example cURL request:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.
Sign up for 1,000 free screenshots a month, with no card required.
Quick Recap
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.




