How to Capture a Full-Page Screenshot of a Website with a Cookie Banner
Capture a website’s full page with its cookie banner visible, or document the page after consent using Firefox or Playwright.
To capture a full-page screenshot with a cookie banner, decide whether the banner should appear in the image, then capture the page before or after making a consent choice. In Firefox, enable Take a screenshot of the entire page in Developer Tools settings and use that button. For repeatable automation, use Playwright with fullPage: true.
The timing matters: capture before interacting with the banner to record its initial appearance; make your preferred consent choice and wait for the page to update if you want the resulting page state instead. Banner behavior varies by site, so check the screenshot to confirm it shows the state you intended.
1. Choose which cookie-banner state to capture
Before taking the screenshot, choose the state you need to document:
| What the screenshot should show | When to capture |
|---|---|
| The banner as a visitor first sees it | Before clicking, dismissing, or otherwise interacting with the banner. |
| The page after your consent choice | After making a choice and waiting for the page to update. |
These steps describe a capture workflow, not a guarantee that every website will behave the same way. A site may update its layout, reload content, or keep other overlays visible after your choice. Inspect the finished image and repeat the capture if the page has not settled into the state you need.
2. Capture the full page in Firefox
- Open the page in Firefox.
- Open Developer Tools and open its Settings.
- Under Available Toolbox Buttons, enable Take a screenshot of the entire page.
- Return to the page. If you need the banner in its initial state, do not interact with it. If you need the post-choice state, make your choice and wait for the page to update.
- Click the entire-page screenshot button in the Developer Tools toolbar.
- Check Downloads for the saved screenshot.
Firefox’s full-page screenshot control captures the page and saves the image in Downloads. The exact menu labels or toolbar placement may vary across browser versions; if the button is missing, recheck the Available Toolbox Buttons setting. See Firefox’s Page Inspector documentation for the browser’s screenshot workflow.
3. Use Firefox’s Web Console command
Firefox also supports a command in the Web Console. Open the console and run:
screenshot screenshot.png --fullpage
Firefox saves the full-page capture using the filename you provide. Choose a filename with a .png extension if you want a PNG. As with the toolbar workflow, take the screenshot before banner interaction to preserve its initial state, or after your choice and the page update to capture the resulting state. Refer to Firefox’s Web Console command-line documentation for command details.
4. Automate full-page screenshots with Playwright
For a repeatable script, Playwright’s page screenshot API accepts fullPage: true. The following is a runnable Node.js example using Playwright’s Chromium browser. It captures the page as initially loaded, so a cookie banner that appears on load should remain visible unless the site itself dismisses it.
import { chromium } from 'playwright';
const url = process.argv[2] ?? 'https://example.com';
const browser = await chromium.launch({ headless: true });
try {
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'networkidle', timeout: 60_000 });
await page.screenshot({ path: 'screenshot.png', fullPage: true });
} finally {
await browser.close();
}
Save it as capture.mjs, install Playwright with npm install playwright, install its Chromium browser with npx playwright install chromium, then run node capture.mjs https://example.com. The output file is screenshot.png. Playwright defines a full-page screenshot as a capture of the full scrollable page; it can also return screenshot data as a buffer for further processing. See the Playwright screenshot documentation.
Capture after choosing consent
To capture the page after a consent action, perform that action before the screenshot. Replace the example selector with a selector that matches the site’s consent button:
await page.goto(url, { waitUntil: 'networkidle', timeout: 60_000 });
await page.locator('button[data-consent="accept"]').click();
await page.waitForTimeout(500);
await page.screenshot({ path: 'after-consent.png', fullPage: true });
The selector and delay are site-specific examples, not universal consent controls. Inspect the page to choose the right button and wait condition. If the choice causes navigation, wait for the expected page state before capturing rather than relying on a fixed delay alone.
Make repeated captures more consistent
- Use the same browser version, viewport, URL, and consent state for each run.
- Wait for the page or a specific element to reach the state you need. A fixed delay may be insufficient on a slow page or unnecessarily long on a fast one.
- For pages that keep background network connections open,
networkidlemay never arrive. Use a different navigation wait condition and wait for a page-specific element instead. - Set a deliberate browser context and storage state if the capture needs to reuse a consent choice. Avoid reusing it when you need to show a first-visit banner.
- Review long-page output for content that loads only after scrolling. Full-page capture does not guarantee that every site’s lazy-loaded content has already rendered.
5. Cookie inspection is a separate task
If you need to inspect cookies stored for a site in Chrome, use Developer Tools’ Application > Storage > Cookies view and select an origin. That view helps inspect stored cookies; it is not the procedure for taking a full-page screenshot. For the screenshot itself, use the browser capture workflow or an automation API. See Chrome DevTools cookie inspection documentation.
6. Troubleshooting
| Problem | Likely cause | What to do |
|---|---|---|
| The Firefox full-page button is missing | It is not enabled in the toolbox settings. | Open Developer Tools settings and enable Take a screenshot of the entire page under Available Toolbox Buttons. |
| The banner is absent from the screenshot | You dismissed it, an earlier consent choice was stored, or the site did not show it on this visit. | Capture before interacting. If a previous choice is stored, use a fresh browser context or clear the site’s relevant stored state, then reload and check whether the banner appears. |
| The screenshot shows the banner, but you wanted the clean page | The capture happened before the consent action or before the page updated. | Make your choice first, wait for the resulting page state, then capture again. |
Playwright times out at networkidle |
The page may keep network activity going, so the idle condition is not reached. | Use an appropriate alternative navigation wait condition and wait for a specific element that indicates the page is ready. |
| Some page content is missing | Content may load only when scrolled into view, or the capture began before rendering finished. | Wait for the relevant content or trigger its loading before capture; inspect the image and adjust the page-specific wait as needed. |
| The post-consent screenshot still has an overlay | The click may not have matched the intended control, or the site may show another overlay. | Verify the selector and consent result in the browser before taking the screenshot. Treat each site’s banner behavior as site-specific. |
7. Choosing a capture method
| Method | Best fit | Trade-off |
|---|---|---|
| Firefox screenshot button | A one-off manual capture. | Requires a browser interaction for each capture. |
| Firefox Web Console command | A manual capture using a filename and command. | Still depends on an open Firefox session and manual setup. |
| Playwright | Repeatable scripts and workflows that need browser control. | Requires installing and maintaining browser automation, plus site-specific handling of consent and page readiness. |
| ScreenshotNeo API | Captures from a single HTTP request, without setting up browser automation. | Requires an API key for the service; review the response headers to see the page verdict and billing outcome. |
8. Performance, reliability, and cost considerations
A full-page image includes more content than a viewport capture, so very long pages can take more time and produce larger files. Wait only for the page state you need, and use consistent conditions when comparing captures. Automation adds browser installation and execution to your workflow; a browser API can reduce that setup when you only need a screenshot response.
For reliable evidence, record whether you captured before or after consent, use a clean browser context when you need first-visit behavior, and inspect the saved output. No capture method can guarantee identical results across sites that change content dynamically or handle consent differently.
With ScreenshotNeo, only clean screenshots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing. Each response includes X-Page-Verdict and X-Billed headers so you can see the result. Plans include 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000 screenshots. See ScreenshotNeo for product details.
9. Or skip the browser setup
ScreenshotNeo takes a screenshot with one GET request. Its capture can accept cookie or consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each cleanup step can be turned off. The example below captures the page with the API’s default output settings. See the ScreenshotNeo API documentation for options and response details.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" \
-d access_key=YOUR_API_KEY \
--data-urlencode url=https://stripe.com \
-o shot.webp
Python
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
const bytes = new Uint8Array(await res.arrayBuffer());
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', bytes));
Bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents using Claude, Cursor, or another MCP client take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.
Create a free ScreenshotNeo account and get 1,000 screenshots a month with no card.
10. FAQ
Does a full-page screenshot include a cookie banner?
It includes the banner if the banner is visible when the capture happens. Capture before interacting with it to record its initial appearance.
Does taking a screenshot accept cookies?
The Firefox and Playwright screenshot steps do not themselves make a consent choice. A consent action must be performed separately if you want to capture the page afterward.
Can I inspect cookies with the screenshot?
No. A screenshot records rendered page content. Use the browser’s cookie inspection tools when you need to examine stored cookies.
Which option is simplest for one image?
Use Firefox’s built-in full-page screenshot button. For repeated captures, Playwright provides a scriptable screenshot API.


