Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use browser automation to open the actual search-results URL, interact with the consent control shown on that page, verify the dialog is gone, and only then capture the screenshot. Consent buttons and markup vary by site, language, and session, so there is no reliable universal selector. The Playwright example below demonstrates the sequence; replace its sample button name and consent choice with the target page’s actual interface.

Capture a SERP after dismissing its consent banner

This Playwright example takes a screenshot of the current viewport after a visible HTML consent button is clicked and the button disappears. It assumes you already have a Playwright page and a target search-results URL.

await page.goto(targetSerpUrl);

const rejectOptional = page.getByRole('button', { name: 'Reject optional cookies' });
await rejectOptional.waitFor({ state: 'visible' });
await rejectOptional.click();
await rejectOptional.waitFor({ state: 'hidden' });

await page.screenshot({ path: 'serp.png' });

The button role and accessible name are examples, not a universal selector. Inspect the actual consent interface and substitute its visible control and intended action. For example, if the test is meant to reject optional cookies, choose the rejection control rather than accepting cookies simply to clear the overlay. Browserless’s practical examples likewise treat selector lists as starting points that need adjustment for the target site: Browserless cookie-consent examples.

Playwright documents the page navigation, locator, screenshot, and full-page options in its Page API. Explicitly waiting for and dismissing predictable overlays as part of the test flow is preferable to depending on a locator handler.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • 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 the capture reflect the requested scope

page.screenshot() captures the viewport by default. Add fullPage: true only when the deliverable needs the whole scrollable results page:

await page.screenshot({ path: 'serp-full.png', fullPage: true });

A full-page image is taller; it is not necessary just to remove a consent overlay. Keep the browser, viewport, and execution environment consistent when comparing captures. Search results can still change between runs, and a stable viewport does not make page content or consent behavior invariant.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • 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

Use screenshot assertions for visual regression

For a repeatable Playwright Test visual check, use toHaveScreenshot() rather than treating a one-off screenshot as a regression assertion. Playwright Test waits for two consecutive screenshots to match before comparing the last image with the baseline. This helps with transient rendering differences, but does not guarantee that dynamic SERPs or site-specific consent behavior will remain unchanged. See the PageAssertions API.

Identify the consent interface before automating it

Consent controls are specific to the target page. Their labels, languages, markup, and behavior may vary. Prefer a stable accessible role and name when the page exposes one; otherwise inspect the rendered page and use an appropriate site-specific selector. If the control is inside a frame, locate it in the relevant frame rather than assuming it belongs to the main page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • 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.

After clicking, verify a meaningful post-choice state before capturing. Waiting for the button to become hidden is one possible check; some pages instead replace the banner, close a modal, or show a confirmation. Choose a condition that reflects the actual interface. Hiding or masking the banner in a screenshot changes the image but does not demonstrate that a consent choice was made; use Playwright screenshot masks or screenshot-only styles only when the capture requirements explicitly permit that treatment.

Distinguish an HTML banner from a browser dialog

A cookie-consent overlay is usually ordinary page content with a button. JavaScript alert, confirm, and prompt are native browser dialogs and require dialog handling instead of clicking an HTML control.

Playwright automatically dismisses JavaScript dialogs if no dialog listener is registered. If you add a page.on('dialog') listener, your handler must accept or dismiss each dialog; leaving one unresolved can stall page actions. Consult the Playwright dialog guide. Selenium also documents handling for native JavaScript alerts, prompts, and confirmations in its WebDriver alerts guide.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • 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

Troubleshoot a consent-and-capture flow

  • The locator never becomes visible: Confirm the banner actually appears in this session, that the page has finished reaching the consent state, and that the accessible name matches the target page and language. Inspect whether the control is inside a frame.
  • The click works but the capture still shows the overlay: Wait for the relevant post-choice state, not just an arbitrary short delay. The page may replace the original control or need a different verification condition.
  • The page action appears stuck: Check whether a native JavaScript dialog is open. If a dialog listener is installed, resolve every dialog by accepting or dismissing it.
  • The screenshot is incomplete: The default capture is the viewport. Set fullPage: true when the entire scrollable page is required.
  • Visual comparisons keep changing: Keep browser and viewport settings consistent, and account for dynamic search results and site-specific consent behavior; stable screenshot assertion timing cannot make changing page content static.
  • The image looks clean but the consent choice was not made: Do not rely on a mask or screenshot-only CSS as a substitute for interacting with the real control when the task requires a genuine post-consent state.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo can return a SERP screenshot through one GET request. Its pre-capture cleanup accepts the cookie or consent banner like a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. The response identifies page verdict and billing status in headers, and bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing. It also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For example, with an API key, adapt the target URL as needed:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://www.google.com/search?q=playwright -o shot.webp

See the ScreenshotNeo API documentation for request options. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for 1,000 free screenshots a month, with no card.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【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.

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.