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

Use a mobile browser view, interact with the site’s own cookie control, confirm the banner is gone, and then capture the page. With Playwright, you can emulate a device profile such as iPhone 13, but the consent button and its wording vary by website—there is no universal selector or automatic dismissal.

Choose the mobile capture environment

Playwright can emulate mobile browser parameters, including viewport, user agent, screen size, and touch behavior. Its documentation describes this as device emulation: it is not the same as capturing or testing on a physical handset. See Playwright’s Emulation documentation for device profiles and custom settings.

For a profile-based capture, use a documented device profile. For a particular screen size or other parameters, use a custom viewport or configure the context explicitly. Choose based on the mobile view you need to document.

Dismiss the banner using the site’s actual consent control

Navigate to the target page and wait for its consent interface to appear. Then identify the visible control that matches the intended outcome. Depending on the site, that might mean rejecting optional cookies, accepting them, or opening settings and choosing specific options. Those actions are not interchangeable: describe the choice you made accurately.

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

There is no reliable universal cookie-banner button name or selector. The example below uses “Reject optional cookies” only as illustrative text. Replace it with a locator that matches the target site’s real control. After activating the control, verify the banner is no longer visible before taking the screenshot.

Capture a mobile screenshot with Playwright

Install Playwright and its browser if you have not already, then save this as an ES module, for example capture-mobile.mjs. Replace the URL and consent-button locator for the site you are capturing.

#1 Best Overall
Ailun 3 Pack Screen Protector for iPhone 17e/16e/14/13/13 Pro
  • 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.
import { chromium, devices } from 'playwright';

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

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

  // Illustrative only: use the target site's actual control and wording.
  const rejectButton = page.getByRole('button', {
    name: 'Reject optional cookies',
    exact: true,
  });
  await rejectButton.waitFor({ state: 'visible' });
  await rejectButton.click();

  // Verify the site-specific banner is no longer visible.
  // Replace this locator with the target site's banner container.
  const banner = page.locator('[data-cookie-banner]');
  await banner.waitFor({ state: 'hidden' });

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

The button name and [data-cookie-banner] selector are examples, not selectors Playwright guarantees. Inspect the page and substitute its real accessible button name or selector. If the site removes the banner from the page instead of hiding it, Playwright’s hidden-state check also succeeds when the locator is detached.

Capture the visible screen, whole page, or one element

The default screenshot captures the current viewport. To include content below the fold, use await page.screenshot({ path: 'mobile-full.png', fullPage: true });. To capture a particular page element, locate it and call await page.locator('YOUR_SELECTOR').screenshot({ path: 'element.png' });. Replace the example selector with the target element’s actual selector. Playwright documents these options, along with screenshot scaling, in its Screenshots documentation and Page API reference.

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

Use a custom viewport instead of a device profile

If you need a specific viewport rather than the parameters in a device profile, configure it when creating the browser context:

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.
const context = await browser.newContext({
  viewport: { width: 390, height: 844 },
  isMobile: true,
  hasTouch: true,
});

This sets a browser-emulated view. It does not establish how a particular physical phone renders the page.

Check the result before using it

  • Confirm the banner is gone and that the screenshot reflects the consent choice you intended.
  • Inspect the saved image at its intended dimensions. A viewport capture and a full-page capture show different amounts of content.
  • If the banner remains, revisit the locator, the control’s accessible name, and whether the click actually triggered the site’s consent interface. The screenshot command does not choose or validate consent for you.
  • If you need evidence from a real handset, capture on that device; an emulated profile is not a physical-device test.

When to hide a banner visually instead

Using the site’s consent control is different from removing a visual obstruction for presentation. A screenshot-time style that hides a banner can produce an unobstructed image, but it does not demonstrate that the site recorded a consent choice. If you only need visual cleanup, state that purpose clearly and do not describe the result as user consent.

Troubleshooting

The consent button is not found

The site may use different wording, render the control in a different element, or show consent only after another page event. Inspect the actual interface and use a locator for the visible control that matches the desired choice. Do not assume “Accept,” “Reject,” and “Settings” have equivalent effects.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
PEHAEL for iPhone 17e/16e/14/13/13 Pro Privacy Screen Protector
  • [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.

The click runs but the banner stays visible

Check that the locator targets the intended button and that the site completed its response. Verify the correct banner container in the page, then wait for that site-specific element to become hidden or detached before capturing.

The screenshot has the wrong dimensions or content

Check whether you intended the viewport, the full scrollable page, or a single element. Confirm the selected profile or custom viewport is the one you meant to emulate, and inspect the output image rather than assuming the capture scope.

The screenshot is not representative of a physical phone

Device emulation adjusts browser parameters but is not a substitute for a capture on the handset. Use a physical-device workflow when the exact hardware rendering is the evidence you need.

Rank #4
Sale
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.
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 URL with one GET request. Its capture flow accepts cookie and consent banners as a visitor and removes known consent platforms, newsletter popups, and chat widgets before the shot; each cleanup step can be turned off. It reports whether a response was a bot check, blank page, timeout, failed load, or cache hit, and only clean shots are billed. Its MCP server provides screenshot tools for AI agents, and the free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots.

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

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

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 a website screenshot API and MCP server by Yorker Media. Learn more at ScreenshotNeo, or sign up free for 1,000 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.

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.