Use two browser states: capture the page in a fresh browser context before touching the consent banner, then make one clearly recorded choice—accept, reject, or customize—and capture again after the page settles. Keep the browser, viewport, and URL the same so the images show the effect of that choice rather than unrelated changes.
What to capture
A before-and-after pair documents one path through a site’s consent interface; it does not represent every possible consent outcome. Label the second image with the choice made, such as after rejecting optional cookies, rather than using the ambiguous label “after consent.” Accept, reject, and custom settings may produce different results.
Start in a fresh browser context so a previous visit’s saved preference does not suppress the banner. Browser contexts are isolated, non-persistent sessions in Playwright; its APIs also let you inspect cookies and storage state. The site determines how it records a choice, however, so do not assume a particular cookie name or storage mechanism. See Playwright browser contexts and BrowserContext APIs.
Capture the two states with Playwright
Install Playwright and its Chromium browser if you have not already:
Free tools Windows power users keep installed
One-click scans. No signup required.
As an Amazon Associate I earn from qualifying purchases.
npm init -y
npm install playwright
npx playwright install chromium
Save this as consent-shots.js. Replace the URL and the consent button’s accessible name with values verified on the site. The script creates a new context for a clean first-visit state, saves the initial screenshot, clicks the selected choice, waits for the banner to disappear, and saves the second screenshot.
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: true });
const context = await browser.newContext({
viewport: { width: 1440, height: 900 },
deviceScaleFactor: 1
});
const page = await context.newPage();
try {
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
// Verify this readiness condition for the target site.
await page.locator('body').waitFor({ state: 'visible' });
await page.screenshot({ path: 'before-consent.png', fullPage: true });
// Replace with the exact accessible name for the choice being documented.
const choice = page.getByRole('button', { name: 'Reject optional cookies' });
await choice.waitFor({ state: 'visible' });
await choice.click();
// Replace with a site-verified condition if the banner does not disappear.
await page.getByRole('button', { name: 'Reject optional cookies' })
.waitFor({ state: 'hidden' });
await page.screenshot({ path: 'after-rejecting-optional-cookies.png', fullPage: true });
} finally {
await context.close();
await browser.close();
}
})();
Run it with node consent-shots.js. For an accept or customize capture, use that control instead and change the output filename so the saved image records the actual action. If the banner uses a link, checkbox, or custom widget rather than a button, choose a locator matching the real interface.
Make comparisons repeatable
- Use the same browser engine, viewport, device scale factor, route, and page conditions for both captures.
- Wait for a meaningful page condition—such as a verified banner or content element—rather than relying on a short fixed delay. Sites may load content or update the banner asynchronously.
- If animations or changing content create visual noise, Playwright screenshot options can disable animations or apply styles for controlled captures. Its screenshot assertion documentation describes waiting for consecutive screenshots to match; that assertion is for test-runner visual comparisons. For direct captures, use the page screenshot API as in the example. See visual comparisons and Page.screenshot.
- When recording more than one outcome, keep separate pairs for accept, reject, and custom settings. Note banner visibility, visible page changes, and whether the choice persists on reload or in a fresh session only if you have observed those results.
Or skip the browser setup
ScreenshotNeo can capture the page with a single request. It is a website screenshot API and MCP server for developers. Cookie banners, newsletter popups, and chat widgets are removed before the shot; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response reports the page verdict and billing status in headers. Its MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
For a capture, get an API key and run this cURL request, replacing the target URL as needed. See the ScreenshotNeo API documentation for parameters and response details.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
ScreenshotNeo is useful when you want a screenshot without managing a browser session, while Playwright gives you direct control over the exact consent interaction and resulting browser state. Sign up for 1,000 free screenshots a month with no card.
#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
Troubleshooting
The banner is missing from the first screenshot
Confirm that each run creates a new browser context and that you are not reusing saved storage state. The site may also show its interface only after a delay or under particular conditions; inspect the page and wait for the relevant element. Do not assume clearing one named cookie is sufficient, since sites can store preferences in different ways.
The consent control cannot be found
Inspect the rendered interface and use a locator that matches the actual accessible role and name. The example’s button name is illustrative, not universal. Some banners place controls inside frames or implement them with elements other than buttons; adapt the locator to the verified page structure.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesThe second screenshot still shows the banner
Check whether the click actually registered and whether the selected control closes the banner. Some interfaces require a separate save or confirm action after customizing settings. Wait for a site-specific post-choice condition instead of assuming every banner disappears immediately.
The images differ for reasons unrelated to consent
Keep capture conditions constant and wait for the page to settle. Advertisements, rotating content, timestamps, animations, and other dynamic elements can change independently. Use screenshot styling or animation handling where appropriate, and avoid hiding page elements that are material to the comparison.
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
A saved state or screenshot contains sensitive data
Do not commit authentication state, real account cookies, or sensitive headers to a source repository. Playwright warns that saved authentication state may contain cookies and headers that could allow account impersonation; keep such files private and exclude them from version control. See Playwright authentication state guidance.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What screenshots can and cannot establish
These captures show what appeared in a particular browser session before and after a recorded choice. They do not, by themselves, establish whether a site complies with cookie law or whether the consent mechanism is legally sufficient. That depends on matters beyond what screenshots reveal, and this workflow does not assess them.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →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
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.
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.




