iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Use Playwright’s fullPage: true option to capture the whole scrollable page. A full-page image and a sticky header’s visible viewport state are not necessarily the same thing, so if the header must appear exactly as it looks at a particular scroll position, capture the header separately as well and inspect both outputs.
Capture the full page with Playwright
Playwright’s page screenshot API supports full-page capture. This minimal Node.js example opens a page and saves one tall image of its scrollable document:
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
await page.goto('https://example.com', { waitUntil: 'networkidle' });
await page.screenshot({ path: 'page.png', fullPage: true });
await browser.close();
})();
Install Playwright in your project first, then run the script with Node.js. The viewport is explicit so the page layout is repeatable in the same browser environment. Replace the example URL with the page your agent needs to capture. See the Playwright Screenshots documentation for the full-page option and related examples.
fullPage: true requests the full scrollable page; it does not, by itself, guarantee that every site renders sticky elements the way they look in an ordinary viewport screenshot. A full-page capture may represent the document differently from a live viewport with the page scrolled to a particular point. Check the actual image when the header’s exact visual state matters.
Preserve the header’s visible state explicitly
If you need proof of how the sticky header looked while visible, save an additional screenshot of the header element. This captures the element’s bounds, rather than relying on full-page rendering to preserve a particular sticky state.
await page.locator('header').screenshot({ path: 'header.png' });
Use a selector that matches the site’s actual header; some pages use a class or another element instead of a semantic <header>. The locator must resolve to the intended element and be visible. The element screenshot is a crop, not a replacement for the full-page document image. See the Playwright ElementHandle API for element screenshot behavior and visibility considerations.
Make the capture workflow reliable
- Set the intended viewport. Use the same desktop or mobile dimensions for the capture and any later comparison. A responsive page can change its header and layout across viewport sizes.
- Navigate and wait for the page. Wait until the page is in the desired state before capturing.
networkidlecan be useful for pages that settle after requests finish, but a page with continuing network activity may need a different, page-specific wait condition. - Trigger scroll-loaded content. If sections or images load only when scrolled into view, scroll through the page and wait for those sections to render before asking for the full-page screenshot. Full-page capture requests the document extent; it does not establish that arbitrary lazy-loaded content has already appeared.
- Capture the document and, if needed, the header. Save the full-page image with
fullPage: true. If a specific header state is required, capture the header element separately after the page reaches that state. - Inspect the images. Look for a missing or repeated header, unloaded sections, overlays, and content cut off at the edges. Do not treat the screenshot as verified until the saved output has actually been checked.
Choose the screenshot scope that matches the goal
| Capture | What it shows | Use it when |
|---|---|---|
| Viewport | The currently visible area, including a sticky header if it is visible at that moment. | You need the page’s current on-screen state. |
| Full page | The full scrollable document in one tall image, requested with fullPage: true. |
You need a single image covering the document. |
| Header element | A cropped image bounded by the selected header element. | You need to preserve the header as a distinct image in a chosen page state. |
Using Playwright MCP with an AI agent
Playwright MCP’s screenshot tool supports viewport, element, and full-page captures. When using its options, note that fullPage cannot be combined with an element target. Take separate captures if you need both the full document and the header crop. Its scale option selects CSS-pixel or device-pixel output: CSS scale tracks CSS layout dimensions, while device scale produces higher-resolution output. See the Playwright MCP Screenshots documentation for the tool options.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#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
Make screenshot comparisons repeatable
For visual tests, keep the browser, viewport, and execution environment consistent between a baseline and a new capture. Playwright Test’s toHaveScreenshot() waits for two consecutive screenshots to match before comparing against the stored expectation. Screenshot options can also handle animations, masks, clip regions, and injected styles. These controls reduce some variation; they do not guarantee pixel-identical results across different operating systems, browser versions, hardware, settings, power sources, or headless modes. See Playwright visual comparisons and the PageAssertions API.
Or skip the browser setup
ScreenshotNeo is a screenshot API and MCP server for developers. Its API returns an image or PDF from a GET request; the example below saves a WebP screenshot. See the ScreenshotNeo API documentation for parameters and response details.
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
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://example.com
-o shot.webp
ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers indicate the page verdict and billing status. 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 with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo to get 1,000 free screenshots a month with no card.
Recommended Free Tools
Frequently Asked Questions
Does a full-page screenshot always show a sticky header only once?
No universal outcome is promised for every site. Inspect the saved image, and capture the header separately if its exact visible state matters.
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.
Can I use a full-page and element screenshot in one Playwright MCP capture?
No. Playwright MCP’s screenshot options do not allow an element target together with fullPage; take separate captures.
Quick Recap
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.
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
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.

