The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Navigate to the page, wait for the readiness condition your capture needs, then call page.screenshot({ fullPage: true }). Playwright’s page.goto() already waits for the load event by default; for content that appears asynchronously, wait for a meaningful locator before capturing.
Capture a full page after the load event
In a Playwright script, pass fullPage: true to capture the full scrollable page rather than just the visible viewport. The following example explicitly sets waitUntil: 'load', although that is already page.goto()‘s default.
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'load' });
await page.screenshot({ path: 'full-page.png', fullPage: true });
await browser.close();
})();
Save the script as screenshot.js, install Playwright in your project with npm install playwright, and run node screenshot.js. The screenshot is written to full-page.png in the current directory. You can omit path to have page.screenshot() return an image buffer for further processing.
Choose a readiness condition that matches the page
“Finished loading” can mean different things. The right wait condition depends on what must be present in the screenshot.
#1 Best Overall
| Condition | What it waits for | When it fits |
|---|---|---|
domcontentloaded |
The HTML has been parsed and the DOMContentLoaded event has fired. |
When the workflow needs the parsed document but does not depend on later resources. |
load |
The page’s load event. This is the default for page.goto(). |
A general baseline when document resources should have loaded. |
| Locator or web assertion | A particular UI condition that you specify. | When app content, such as a main section loaded asynchronously, must be visible. |
networkidle |
No network connections for at least 500 ms. | Use cautiously: Playwright discourages relying on this for tests, and background connections may prevent it from occurring. |
The signals are not interchangeable and none guarantees that every page-specific action has completed. Choose based on the content you need to capture, not on an assumption that one is universally best or fastest. The Playwright Page API documentation describes the navigation wait conditions and their behavior.
Wait for asynchronous content when needed
A page can continue rendering content after its load event. If the screenshot needs a specific section, wait for that section rather than adding an arbitrary delay. Replace main with a locator that genuinely indicates the content required by your application.
Rank #2
await page.goto('https://example.com');
await page.getByRole('main').waitFor({ state: 'visible' });
await page.screenshot({ path: 'full-page.png', fullPage: true });
If navigation has already taken place, you can wait for a load state directly:
await page.waitForLoadState('load');
await page.screenshot({ path: 'full-page.png', fullPage: true });
waitForLoadState() requires a committed navigation. If the requested state has already occurred, it resolves immediately. For test readiness, Playwright’s Page API documentation says: “Don’t use this method for testing, rely on web assertions to assess readiness instead.” That guidance matters especially for networkidle; a locator or assertion tied to the page’s actual content is usually a clearer test condition.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Understand what the screenshot call does—and does not—wait for
page.screenshot({ fullPage: true }) requests a full-page capture, but do not treat an ordinary screenshot call as a guarantee that the page has reached visual stability or that two renders match. Playwright Test’s expect(page).toHaveScreenshot() has separate stability behavior: it captures until two consecutive screenshots match, then compares the last capture with the expectation. The Playwright visual comparisons documentation also notes that rendering can vary with the host operating system, browser version, settings, hardware, power source, and headless mode. Keep those conditions consistent when comparing visual baselines.
Troubleshoot missed or incomplete content
- The screenshot is only the visible viewport: Set
fullPage: truein the screenshot options. - A section is missing even though navigation completed: The page may render it asynchronously. Wait for a locator or web assertion that identifies the required content before capturing.
networkidlenever arrives: The page may keep background requests or connections open. Use a page-specific readiness condition instead of waiting for network quiet.- A fixed sleep sometimes works but sometimes fails: Replace timer-based waiting with a locator or assertion. Playwright discourages
page.waitForTimeout()for tests because timer-based tests are inherently flaky. - Visual comparisons differ across machines: Browser and host rendering conditions can affect output. Run baseline and comparison captures in a consistent environment.
waitForLoadState()does not wait for a new navigation: It waits for a state associated with a committed navigation, and resolves immediately when that state has already been reached. Make sure the navigation occurs as expected and wait for the relevant locator if the desired content is later-rendered.
Or skip the browser setup
If you want a screenshot without setting up a Playwright browser, ScreenshotNeo provides a website screenshot API and MCP server. Its one-call request can return a screenshot or PDF:
Rank #4
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Before capture, it accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, with the response identifying the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo to get 1,000 free screenshots a month with no card.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteFrequently Asked Questions
Does Playwright wait for the page to load before taking a screenshot?
Yes. page.goto() defaults to waiting for the load event; use an explicit locator wait when the capture depends on content rendered later.
What option captures the entire page in Playwright?
Set fullPage: true in the options passed to page.screenshot().
Does networkidle mean the page is ready for a screenshot?
Not necessarily. It indicates at least 500 ms without network connections, but Playwright discourages using it for tests; choose a condition that reflects the content you need.
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.

