October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How to Capture a Mobile Website Screenshot With a Cookie Banner Dismissed

A practical Playwright workflow for emulating a mobile browser, using the site’s own cookie control, verifying dismissal, and saving a viewport or full-page screenshot.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a mobile browser profile, make the intended choice on the website’s own cookie banner, confirm the banner has disappeared, then capture the viewport or full page. With Playwright, device emulation makes that workflow repeatable; it does not turn the capture into a test on a physical phone.

Choose the capture environment and scope

Playwright can emulate mobile-device parameters such as viewport, user agent, screen size, and touch behavior. Its documentation describes emulating a real device; the resulting capture is still an emulated browser view, not evidence from a physical handset. See Playwright’s emulation guide.

Decide what the screenshot needs to show before capturing:

As an Amazon Associate I earn from qualifying purchases.

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.
  • Viewport: the visible mobile screen after the banner is handled.
  • Full page: the page’s scrollable content, including below-the-fold sections.
  • Target element: a particular page component rather than the whole screen.

Playwright documents viewport, full-page, and element screenshot options in its screenshot tools reference and Page API.

Dismiss the banner by making the intended choice

There is no universal cookie-banner button, label, or selector. One site may offer “Reject optional cookies,” another may say “Manage preferences,” and some may use different markup entirely. Choose the visible control that matches the intended consent outcome; do not describe accepting, rejecting, or configuring cookies as interchangeable ways to dismiss a banner.

The example below uses Playwright’s documented iPhone 13 device profile. Replace the example URL and button label with the target site and the actual visible control on that site. The label is illustrative, not a universal selector.

#1 Best Overall
Ailun 3 Pack Screen Protector for iPhone 17e/16e/14/13/13 Pro | 6.1 Inch, Tempered Glass, Case Friendly, Not for iPhone 16 6.1 Inch
  • WORKS FOR iPhone 17e/16e/14/13/13 Pro 6.1 Inch Display Screen 0.33mm tempered glass screen protector.Featuring maximum protection from scratches, scrapes, and bumps.[Not for iPhone 16 6.1 inch, iPhone 13 mini 5.4 inch, iPhone 13 Pro Max/iPhone 14 Pro Max/iPhone 14 Plus 6.7 inch, iPhone 14 Pro 6.1 inch]
  • Specialty:to enhance compatibility with most cases, the Tempered glass does not cover the entire screen. HD ultra-clear rounded glass for iPhone 17e/16e/14/13/13 Pro is 99.99% touch-screen accurate.
  • 99.99% High-definition clear hydrophobic and oleophobic screen coating protects against sweat and oil residue from fingerprints.
  • It is 100% brand new,Precise laser cut tempered glass, exquisitely polished,2.5D rounded edges.
  • Online video installation instruction: Easiest Installation - removing dust and aligning it properly before actual installation,enjoy your screen as if it wasn't there.

Install and run the Playwright example

In a Node.js project, install Playwright and its Chromium browser:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npm install playwright
npx playwright install chromium

Save this as capture-mobile.mjs and run it with node capture-mobile.mjs:

Rank #2
WowFluy 3 Pack for Blu View 5 Tempered Glass Screen Protector, Scratch-Proof, Bubble-Free,HD Transparent, 9H Hardness,Bubble Free,Case Friendly
  • [Compatibility]: This tempered glass screen protector is compatible with the following models: Blu View 5 (Note: Not suitable for other models).
  • [Included Tools]: Each screen protector comes with dust stickers and a cleaning kit, making it super easy to apply without bubbles and keeping your screen nice and clean.
  • [Premium Material]: Made from high-quality tempered glass, it boasts excellent hardness to effectively reduce scratches. You’ll enjoy lightning-fast responsiveness and crystal-clear clarity.
  • [Craftsmanship]: The tempered glass screen protector features a finely polished 2.5D rounded edge design, providing a smooth touch and a perfect fit for your phone.
  • [Customer Support]: We offer quick and reliable after-sales support and service that you can trust.
import { chromium, devices } from 'playwright';

const browser = await chromium.launch();
const context = await browser.newContext({ ...devices['iPhone 13'] });
const page = await context.newPage();

try {
  await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });

  // Replace with the target site's real consent control and intended choice.
  const consentButton = page.getByRole('button', {
    name: 'Reject optional cookies',
    exact: true,
  });
  await consentButton.waitFor({ state: 'visible', timeout: 10000 });
  await consentButton.click();

  // Replace this selector with the site's actual banner container.
  const banner = page.locator('#cookie-banner');
  await banner.waitFor({ state: 'hidden', timeout: 10000 });

  await page.screenshot({ path: 'mobile-page.png' });
} finally {
  await browser.close();
}

The banner-container selector is also site-specific. If the banner is removed from the page after the choice, the hidden-state check will pass; if the site retains an invisible container, confirm the relevant visible interface is gone and adjust the check accordingly. The screenshot call captures the current viewport. For a full-page image, change it to await page.screenshot({ path: 'mobile-page.png', fullPage: true });.

Verify the result before relying on it

  1. Open the output image at its intended display dimensions and check that it shows the expected mobile layout.
  2. Confirm the banner is absent and that the chosen control matched the intended consent outcome.
  3. If the banner remains, inspect the site’s actual accessible button name, markup, and post-click state. Fix the locator or wait condition; a screenshot command does not choose consent or validate the site’s state for you.
  4. If the required evidence must come from an actual handset, capture on that physical device instead of presenting emulation as a real-device test.

When a visual cleanup is not a consent choice

Using the site’s own control records a user-like interaction with its consent interface. Merely hiding a banner with CSS, cropping it out, or covering it in the image only removes a visual obstruction; it does not establish that the site’s consent state changed. Be explicit about which kind of image you are producing. Playwright’s screenshot-time styling options should not be treated as proof of a particular site’s recorded 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 capture a page through one GET request. Cookie banners and 60+ known consent platforms, newsletter popups, and chat widgets are handled before the shot; each cleanup step can be turned off. It does not choose a site’s consent outcome on your behalf, so use the site’s visible control in a browser workflow when the purpose is to document a specific consent choice. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. An MCP server provides screenshot 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.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

For API parameters and options, see the ScreenshotNeo documentation. Example request:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

Sign up for 1,000 free screenshots a month with no card.

Best Value
Mr.Shield Tempered Glass Screen Protector for Samsung Galaxy A15 5G/4G
  • Include 3 PCS Screen Protector, Tailored-fit to your device's screen, Maximum Strength.
  • Made of Japan Hardnest Glass, High Scratch Resistance, Smooth and high touch responsive with Superb Oleophobic Coating.
  • HIGH GRADE COMPONENTS: Mr.Shield Ballistic Glass screen protectors use the Silicone adhesives for viewing clarity and easy installation and removal.
  • 99.99% HD clarity and touch accuracy.
  • From scratches to high impact drops, you are protected with Mr.Shield HD Clear Glass.
Rank #4
Ailun Screen Protector + Camera Lens Protector for iPhone 14 Pro, 3+3 Pack
  • Works For iPhone 14 Pro 2022 tempered glass screen protector and camera lens protector.Featuring maximum protection from scratches, scrapes, and bumps.[Not for iPhone 14 6.1 inch, iPhone 14 Plus/iPhone 14 Pro Max 6.7 inch]
  • Night shooting function: specially designed iPhone 14 Pro 6.1 Inch display 2022.The camera lens protector adopts the new technology of "seamless" integration of augmented reality, with light transmittance and night shooting function, without the need to design the flash hole position, when the flash is turned on at night, the original quality of photos and videos can be restored.
  • It is 100% brand new, precise laser cut tempered glass, exquisitely polished. 0.33mm ultra-thin tempered glass screen protector provides sensor protection, maintains the original response sensitivity and touch, bringing you a good touch experience.
  • Easiest Installation - Please watch our installation video tutorial before installation.Removing dust and aligning it properly before actual installation,enjoy your screen as if it wasn't there.
  • 99.99% High-definition clear hydrophobic and oleophobic screen coating protects against sweat and oil residue from fingerprints,enhance the visibility of the screen.
Rank #3
Sale
PEHAEL for iPhone 17e/16e/14/13/13 Pro Privacy Screen Protector | 3 Pack, Installation kits, Anti-Spy Private, Anti-Scratch, 9H Tempered Glass, Case Friendly, [6.1 inch]
  • [Compatible Models] - 3 Pack Privacy Glass Screen Protector for the iPhone 17e/iPhone 16e/iPhone 14/iPhone 13/iPhone 13 Pro(6.1 inch). Includes 3 privacy screen protectors and a cleaning kit. *Two types of packaging boxes are randomly shipped.
  • [Full Coverage Protection] - This screen protector offers edge-to-edge protection for your device, using military-grade explosion-proof glass. It is also compatible with most phone cases, the appropriate size ensures that the phone case won't squeeze the screen protector after installation, providing double protection for the edges of the phone.
  • [High Privacy Protection] - The necessary choice for you in public places. Select the optimal anti-peeping angles for the anti-spy coating to balance privacy and visual comfort. Protect your personal privacy and sensitive information from being seen by people nearby who might peek. To better protect your phone, 3mm nano-scale ultra-thin aviation glass is chosen as the material, it also protects your eyes from harsh light, ensuring a softer visual effect.
  • [Superior Quality] Made of high-quality tempered glass, free of bubble wrap, easy to install and no residue when disassembled. Maintain the original touch experience, with a high-definition and clear hydrophobic and oleophobic screen coating to prevent fingerprints, sweat and oil residue. High-hardness glass protects your screen from drops, impacts, scratches and breaks, providing ultimate protection for your phone.
  • [Face ID Compatible] - Precise cutting combined with high-quality glass material supports the perfect use of the Face ID function, and it can also take high-pixel photos through the front camera.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.