The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →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
A headless browser often shows a cookie banner because it is visiting the site with no saved consent state, just like a first-time visitor. For a functional test, make and verify the intended choice in the banner. For a visual-only screenshot, you can hide a confirmed banner selector in the screenshot stylesheet—but that masks the overlay; it does not record consent.
Why a cookie banner appears in a headless screenshot
Consent banners commonly depend on browser storage to remember a visitor’s choice. A new or cleared browser context may have no such state, and a saved choice may expire or be unavailable. The European Data Protection Board (EDPB), for example, says its own site stores the choice in an edp_cookie_agree cookie that expires after six months; its banner returns if cookies are disabled. That is a policy for the EDPB site, not a general expiry period for cookie banners. See the EDPB Cookie Policy.
Headless mode does not itself mean a site should omit its banner. The important question is what state the browser context has and what your screenshot is meant to demonstrate.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Choose the right approach for the test
| What the screenshot should prove | What to do |
|---|---|
| How consent works for a first-time visitor | Use a clean context, leave the banner visible, choose the state under test, and verify the resulting page state. |
| How the page looks after a returning visitor’s choice | Reuse the context or saved state only if persistence is part of the scenario; verify that the site recognizes it. |
| How the page looks without an unrelated overlay in a visual regression baseline | Mask the known banner in screenshot styling, and treat the image as a visual-only result—not a consent test. |
A screenshot is an image, not evidence that a visitor made a consent choice. EDPB guidance describes consent as an affirmative choice; hiding the interface or merely continuing to browse should not be represented as consent. The EDPB Guidelines 05/2020 on consent address GDPR consent. They are not a legal determination for every site or jurisdiction.
For a functional test: interact with the actual banner
- Inspect the page first. Identify the banner’s accessible role, label, and buttons rather than assuming a generic selector. Playwright documents page inspection and screenshot tools; use the structure actually present on the target page.
- Choose the state your test covers. Click the real control for accepting, rejecting, or configuring consent, as appropriate. Do not hide the banner in a test intended to exercise consent behavior.
- Verify the outcome. Assert that the banner has changed or disappeared and that the page reflects the intended state before capturing. A click alone does not show that the choice was saved or applied.
- Inspect frames if needed. If the observed banner is inside a frame, use your automation framework’s documented frame interaction after identifying that frame. Do not assume all banners use frames.
For a browser that has already reached the page, a Playwright test might use a locator based on the observed accessible name and role:
await page.getByRole('button', { name: 'Reject optional cookies' }).click();
await expect(page.getByRole('dialog', { name: /cookies/i })).toBeHidden();
await expect(page).toHaveScreenshot();
This is illustrative, not a universal locator: the button name and banner structure must match the page you are testing. The EDPB Cookie Banner Taskforce report records positions of participating supervisory authorities; it does not prescribe one identical interface for every site.
For a visual-only test: mask the banner in the screenshot
Playwright supports a stylePath stylesheet for screenshot comparisons, including filtering dynamic or volatile elements. Use this only when the banner is outside the visual question being tested. Confirm the selector on the actual site, because markup and class names differ.
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 glitchesawait expect(page).toHaveScreenshot({
stylePath: './screenshot.css',
});
/* screenshot.css: visual masking only */
.cookie-banner {
display: none !important;
}
Replace .cookie-banner with a selector verified on the target page. This changes the screenshot’s presentation; it does not save a visitor’s choice or test the consent flow. Playwright explains screenshot filtering in its visual comparisons documentation.
Make browser state and capture conditions deliberate
First visit or returning visitor
Use a clean context when the test is meant to cover a first visit. Reuse a browser context or saved state only when the scenario is a returning visitor and persistence is what you intend to test. Cookie names, storage mechanisms, and expiry rules vary by site, so do not assume that a particular cookie name or duration applies everywhere.
Wait for a stable image
Capture only after the relevant interaction and page state have settled. Playwright’s visual assertions wait for two consecutive screenshots to match. Its documentation also notes that rendering can vary with the operating system, browser version, settings, hardware, power source, and headless mode. Keep those conditions consistent when comparing baselines.
#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
Choose the capture area
A banner may cover only part of the viewport or affect the whole page. Playwright documents viewport, element, and full-page screenshots; Puppeteer documents page and element screenshots. Capture the area that answers the test question rather than defaulting to a full-page image. See Playwright’s screenshot documentation and Puppeteer’s screenshots guide.
Crashes, 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 minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallPuppeteer screenshot example
For a functional test, perform and verify the intended choice before taking the image. For a simple capture, Puppeteer’s documented page screenshot flow is:
await page.goto(url);
// For a functional consent test, make and verify the intended choice here.
await page.screenshot({ path: 'page.png' });
Puppeteer also documents screenshots of individual elements in its screenshots guide.
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.
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
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.

