page.evaluate() runs JavaScript in the page and returns that function’s result; it does not capture an image. After the page-side work is complete, call page.screenshot() in your Node.js script. For one element rather than the full page, use ElementHandle.screenshot().
What page.evaluate() does—and what it does not do
Puppeteer’s Page.evaluate(pageFunction, ...args) evaluates a function in the browser page’s JavaScript context and returns its result. Puppeteer awaits a Promise returned by that function. The result might be a title, text, or another value produced by your code; it is not a screenshot file. The API reference describes it as evaluating a function in the page’s context and returning the result: Puppeteer Page.evaluate().
As an Amazon Associate I earn from qualifying purchases.
Screenshot capture is a separate Puppeteer operation on the Page object: page.screenshot(). The official guide identifies that method for capturing screenshots: Puppeteer Screenshots guide.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Capture a page after running page-side JavaScript
Run page.evaluate() when you need to inspect or change page content, then take the screenshot in a subsequent call. This Node.js example assumes Puppeteer is installed and that the target page can be reached:
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://example.com');
const title = await page.evaluate(() => {
// This function runs in the browser page context.
return document.title;
});
console.log('Page title:', title);
// This separate Puppeteer call captures the rendered page.
await page.screenshot({ path: 'screenshot.png' });
} finally {
await browser.close();
}
})();
The example saves the screenshot to screenshot.png, following the official guide’s path pattern. You can omit page.evaluate() entirely if you have no page-side work to do before capturing.
Capture one element instead of the whole page
Wait for the target selector, then call screenshot() on the returned element handle:
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
const element = await page.waitForSelector('.report-card');
if (!element) {
throw new Error('Could not find .report-card');
}
await element.screenshot({ path: 'report-card.png' });
ElementHandle.screenshot() targets that element; the guide notes that Puppeteer attempts to scroll an element into view if it is hidden. See the official screenshots guide for the element capture method.
Choose the output form you need
With path, Puppeteer writes the screenshot to a file. Without that file-saving option, the documented default result is a Uint8Array; the API also documents a base64 string result when you set encoding: 'base64'. Those forms are useful when the next step is to process or transmit the image instead of saving it directly. Check the API reference for the Puppeteer version you use: Page.screenshot().
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
// Get screenshot bytes for downstream processing.
const bytes = await page.screenshot();
// Or request base64 data.
const base64 = await page.screenshot({ encoding: 'base64' });
Wait for the content your screenshot needs
Place application-specific waits between navigation or page changes and the screenshot call. For example, wait for a particular selector if your application renders the target asynchronously:
await page.waitForSelector('.report-ready');
await page.screenshot({ path: 'report.png' });
A selector wait is only an example of coordinating with your page. The reviewed Puppeteer references do not establish a universal wait condition that guarantees every font, image, animation, or lazy-loaded item is ready. Identify the condition that means the specific content you need is ready, then wait for that condition before capturing.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Screenshot operation coordination
The Puppeteer API reference documents a concurrency detail: while a screenshot is in progress in a BrowserContext, BrowserContext.newPage(), Browser.newPage(), and Page.close() wait for the screenshot to finish; Page.bringToFront() does not wait for existing screenshot operations. If your script coordinates captures with page creation, closure, or tab focus, account for that behavior and consult the reference for your installed version: Page.screenshot() API reference.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Troubleshooting common problems
- You got a value but no image. That is the return value of your
page.evaluate()function. Callpage.screenshot()separately on thePage. - The screenshot is missing the change made in evaluate. Make sure the evaluate call is awaited, and take the screenshot after it completes. If the page updates asynchronously after the function returns, wait for an application-specific ready condition too.
- The element capture fails or targets nothing. Confirm the selector matches an element and wait for it before calling
element.screenshot(). The method operates on an element handle, not a selector string. - The image is incomplete. A screenshot call alone does not establish that all page assets or lazy content have finished. Wait for the specific image, component, or state your use case requires.
- You expected a file but received data. Use
{ path: 'screenshot.png' }to save via the guide’s file pattern, or handle the returned bytes/base64 according to the encoding option you selected.
Or skip the browser setup
If you only need a screenshot from a URL, ScreenshotNeo provides a one-request screenshot API and MCP server. For example, save a WebP screenshot using cURL:
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for request options. Cookie banners and consent prompts are accepted or removed before capture, along with known newsletter popups and chat widgets; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. An MCP server exposes screenshot tools for AI agents, and the free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.
Sign up for 1,000 free screenshots a month—no card required.
Version note
The official Puppeteer references reviewed display version 25.12.0. Method roles and options can change between releases, so use the API documentation corresponding to the version installed in your project.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsQuick 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.




