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.

If a screenshot still shows a cookie banner, the cookie may not apply to the screenshot URL, may have the wrong value or attributes, or may not be present in the browser context that loaded the page. Check the exact URL and the app’s consent logic, then set the required state in the same context before navigation. In Cypress, also account for its default cookie clearing between tests.

Check whether the cookie applies to the screenshot URL

A cookie can exist in a browser’s storage without being sent to the page you are capturing. Compare its name, value, domain, path, secure setting, and SameSite setting with the exact URL used for the screenshot. A host-only cookie, for example, is not interchangeable with a cookie scoped to a parent domain. Cypress documents cookie scope options, and Playwright can return the cookies applicable to a specified URL. Cypress cookie documentation; Playwright BrowserContext cookies.

  • Confirm the screenshot URL, including scheme, hostname, and path.
  • Inspect the cookie’s actual domain and path rather than relying on its presence in a general cookie list.
  • Check whether the page uses HTTPS if the cookie is marked secure.
  • For a partitioned third-party cookie, verify the relevant partition context as well.

Verify the consent value and the app’s storage contract

There is no universal consent-cookie name or value. The application might expect a particular string, a structured payload, a cookie created by its consent manager, or state stored somewhere other than cookies. Inspect the target app’s initialization logic and any consent-manager configuration to learn what it reads and when. Browser automation documentation cannot determine the expected format for an unidentified site.

Cypress uses cookieConsent=accepted as an illustrative example, not a universal setting. Use the name and value required by the site you are testing. Cypress FAQ.

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

Set consent in the same browser context before navigation

Seed the cookie in the context that will load and capture the page, before the app initializes. Setting a cookie in another browser, a separate context, or after the consent code has already run will not establish the state the page needs.

#1 Best Overall
R and R Industries Fresh Baked Cookies Windless Swooper Feather Banner Flag Sign | 11.5ft x 2.5ft Outdoor Advertising | Weatherproof Polyester Business Flag (Hardware Not Included)
  • Eye-Catching Fresh Baked Cookies Advertising Flag. Showcase your bakery or food business with this vibrant windless swooper flag. Measuring king-size, it’s designed to grab attention from pedestrians and drivers alike, increasing visibility and promoting your products effortlessly. Perfect for attracting new customers and enhancing the outdoor presence of your bakery, café, or food stall.
  • Easy & Hassle-Free Setup. The flag comes with a sewn sleeve that slides over a compatible flagpole (sold separately) for quick and straightforward installation. Display it outside your store or at special events in minutes, creating an instant promotional impact without the need for complicated tools or setup procedures.
  • Durable Polyester Construction. Crafted from 100% high-quality polyester knit, this feather banner is built to withstand everyday outdoor use. The material retains vibrant colors and resists fraying, ensuring your advertising remains professional and attractive even in harsh weather conditions, including wind, rain, and sun exposure.
  • Dynamic Outdoor Promotion. Designed with a free-flying edge, this swooper feather banner moves in the breeze, drawing attention to your fresh baked cookies. Perfect for storefronts, farmers’ markets, or outdoor events, it encourages customer engagement and foot traffic, helping your bakery stand out in crowded commercial areas.
  • Complete Marketing Solution. Includes 1 king-sized flag (pole and spike sold separately), providing a ready-to-use, high-impact advertising solution. Enhance your marketing strategy by combining this flag with compatible display hardware, boosting brand visibility, attracting more customers, and creating a memorable outdoor presence for your baked goods business.

Playwright

Playwright’s BrowserContext.addCookies() accepts either a cookie url or both domain and path. Then inspect cookies for the exact page URL. Replace the example cookie details with the values your app actually requires.

import { chromium } from 'playwright';

const pageUrl = 'https://example.com/account';
const browser = await chromium.launch();
const context = await browser.newContext();

await context.addCookies([
  {
    name: 'ACTUAL_CONSENT_COOKIE',
    value: 'ACTUAL_VALUE_REQUIRED_BY_THE_APP',
    url: pageUrl,
    sameSite: 'Lax'
  }
]);

console.log(await context.cookies([pageUrl]));
const page = await context.newPage();
await page.goto(pageUrl);

// Assert the banner's expected behavior after the app initializes.
await page.locator('[data-cookie-banner]').waitFor({ state: 'hidden' });
await page.screenshot({ path: 'page.png', fullPage: true });

await browser.close();

The locator shown is only an example: replace it with the banner selector used by your site. Playwright supports cookie attributes including expires, httpOnly, secure, sameSite, and partition keys for partitioned cookies. Use only the attributes appropriate to the cookie and test context. Playwright addCookies API.

Cypress

For a known cookie value, set it in beforeEach so each test starts with the expected state. Use the actual app-specific cookie name, value, and scope. Inspect the returned cookie fields when diagnosing mismatches.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
One Tough Cookie Banner - No DIY Glitter One Tough Cookie Party Decorations for Birthday Party Supplies
  • 【PACKAGE INCLUDES】: Our party decorations include 1 piece of “ONE TOUGH COOKIE” banner specifically designed for birthday party. Create a vibrant and festive atmosphere with this visually appealing decorations.
  • 【PERFECT FOR BIRTHDAY PARTY】: The colorful banner is specially designed with a variety elements that will perfect for celebrating your special ONE TOUGH COOKIE birthday and add funny atmosphere for your party decorations.
  • 【PRE-ASSEMBLED】:The banner comes pre-assembled, so when you receive it, simply unpack and hang it anywhere you like.
  • 【HIGH-QUALITY GLITTER MATERIALS】: Made from durable, high-quality glitter materials, this banner is beautifully printed and reusable for party.
  • 【SATISFACTION GUARANTEED】: Our friendly customer service team is always ready to assist with any questions or suggestions. Feel free to reach out anytime!
beforeEach(() => {
  cy.setCookie('ACTUAL_CONSENT_COOKIE', 'ACTUAL_VALUE_REQUIRED_BY_THE_APP', {
    domain: 'example.com',
    path: '/',
    secure: true,
    sameSite: 'Lax'
  });
});

test('hides the consent banner for an accepted visitor', () => {
  cy.visit('https://example.com/account');
  cy.get('[data-cookie-banner]').should('not.be.visible');
  cy.screenshot('page');
});

Adjust the domain, path, secure and SameSite options to match the real cookie and URL. The banner selector is illustrative. Cypress recommends resetting a known required cookie in a beforeEach hook. For state produced by a server flow, cy.session() can cache and restore browser context state. Cypress setCookie documentation; Cypress session documentation.

Account for test isolation and asynchronous consent initialization

Cypress clears cookies before each test by default. A cookie set manually or during one test may therefore be absent in the next; set known state again in beforeEach or use cy.session() when restoring a server-created session is appropriate. Disabling test isolation is possible, but Cypress cautions that tests can then affect one another. Cypress FAQ.

If the cookie is in place before navigation and the banner still appears, check whether the consent manager initializes asynchronously or reads a different store. Wait for the application to reach a meaningful state before capturing. Avoid assuming that a fixed short delay will always be enough; waiting for a relevant selector or app signal is more reliable when available.

Test the behavior; mask only for a visual-only comparison

Hiding a banner with screenshot-only CSS may be useful when the purpose is to compare page layout, but it does not prove that the app recognized consent or would suppress the banner for a visitor. For a behavior test, assert the banner’s expected visibility after initialization. For a visual baseline that intentionally masks it, document that choice so the image is not mistaken for proof of consent handling.

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

Keep the screenshot environment consistent when comparing snapshots. Playwright notes that rendering can vary with operating system, browser version, settings, hardware, power source, headless mode, and other factors. Playwright visual comparisons. Browserless also demonstrates dismissing a banner before capture and advises adapting selectors to the banner framework. Browserless cookie-consent example.

Troubleshoot by symptom

Symptom Likely cause What to check or change
Cookie appears in storage, but banner remains Cookie domain or path does not cover the screenshot URL, or its value is not what the app expects. Inspect the cookie against the exact URL and verify the consent initialization logic.
Cookie is visible before a test but missing after it starts Test isolation or setup order cleared it, or setup ran in a different context. Set it in each test’s setup hook or restore the intended session state; ensure the page uses that context.
Banner flashes or appears intermittently The app or consent manager may read state asynchronously, or capture happens before initialization finishes. Wait for an app-specific ready signal or banner state before taking the screenshot.
Visual snapshots differ across machines Browser or host rendering configuration differs. Stabilize browser version, operating system, settings, and headless configuration for comparisons.
Hiding the banner fixes the image but not the test Screenshot-only CSS masks the UI without changing the app’s consent state. Use an assertion for behavior tests; reserve masking for explicitly visual-only baselines.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need a clean capture rather than a test of your app’s consent behavior, ScreenshotNeo is a screenshot API and MCP server. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server gives AI agents tools for screenshots, page information, and PDF capture.

One GET request returns an image or PDF. See the ScreenshotNeo documentation for options and response details.

Rank #3
Cookies Sold Here Vinyl Banner (Stop Sign, 36x18 Inches)
  • Draw attention with this 18oz Vinyl Banner. Digitally printed with bright and bold colors, long lasting outdoor weatherproof inks.
  • Each banner include grommets
  • Printed with UV fade-resistant inks. Perfect for indoor or outdoor useage.
  • Printed with UV fade-resistant inks. Perfect for indoor or outdoor useage.
  • Option to print single sided or double sided. Option to upload multiple designs per pack size.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

For this API’s details, formats, and other capture options, see the documentation. The Free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month, with no card required.

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

Frequently Asked Questions

How can I tell which cookies apply to a specific URL in Playwright?

Call BrowserContext.cookies([pageUrl]) with the exact URL you plan to capture; it returns cookies affecting that URL.

Does setting cookieConsent=accepted always hide a banner?

No. It is an example value, not a standard consent cookie. The target application determines the required name, value, and storage mechanism.

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.