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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Generate the fixture with a pinned Playwright browser and a deterministic test page, then call page.screenshot({ fullPage: true, scale: 'css' }). Pin the viewport, operating-system image, fonts, locale, timezone, browser version, data, and animation state; wait for application data and web fonts; save PNG plus metadata; and run OCR against the saved image. This produces a repeatable image of the entire scrollable document rather than only the visible viewport.

The key is reproducibility, not the screenshot call alone. A full-page capture can still change when a lazy image, cookie prompt, clock, random identifier, font package, browser build, or headless setting changes. The workflow below controls those variables and separates OCR assertions from pixel-baseline checks.

What a full-page OCR fixture contains

A fixture is a versioned image and the information needed to explain exactly how it was rendered. The image should represent the complete document content that a user can scroll through, not browser chrome or the operating-system desktop. Use PNG by default because it is lossless and preserves small glyphs and edges for OCR. Playwright can also write JPEG or WebP, and its screenshot API can return an in-memory buffer when an OCR pipeline does not need a file.

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

Keep these artifacts together:

  • Image: for example, fixtures/page.png.
  • Expected OCR: the text that must be recognized, with whitespace normalization rules documented.
  • Geometry expectations: important text bounding boxes or regions, checked separately from the text itself.
  • Metadata: route or URL, viewport width and height, browser and Playwright versions, operating-system image, locale, timezone, font package and version, color scheme, reduced-motion setting, and the content or data revision.

Do not treat an image hash as the whole test. Pixel similarity can pass while OCR text has changed, and OCR can pass while spacing or layout pixels have drifted. Store the original image so a failed assertion can be inspected.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Prepare a deterministic capture environment

Pin the browser and runtime

Install Playwright from a locked dependency file and install the browser binaries in the same build image used by continuous integration. Record the Playwright package version and the actual browser version in fixture metadata. Run the same operating-system or container image for baseline and candidate runs. Playwright warns that screenshots can vary with the host operating system, browser version, settings, hardware, power source, and headless mode; changing any of these can invalidate a baseline even when your application code is unchanged.

Fix rendering inputs

Create a dedicated route with fixed test data. Replace live API responses with a recorded payload or a local fixture. Freeze timestamps, dates, countdowns, rotating content, random IDs, and generated colors where practical. Use a fixed locale and timezone, and install the exact font files and package versions expected by the baseline. A missing font can change line wrapping, which moves every item below it on a full-page image.

Control motion and asynchronous content

Disable CSS animations and transitions for the fixture route. Hide blinking carets and other continuously changing indicators. Wait for application data, web fonts, and the layout to settle. networkidle is useful only after the page has reached a known state; analytics or long-lived sockets can prevent it from becoming idle, so expose an application-ready marker when necessary. Lazy-loaded images deserve special attention: a full-page operation may scroll the document, but your test should still verify that every required image has loaded before capture.

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.

Reference Playwright implementation

The following Node.js script assumes your application serves a deterministic page at http://localhost:3000/ocr-fixture. Adjust the route and the readiness condition to match your test app. The important settings are explicit rather than inherited from a developer workstation.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
import { chromium } from 'playwright';
import { mkdir, writeFile } from 'node:fs/promises';

const browser = await chromium.launch({ headless: true });
const context = await browser.newContext({
  viewport: { width: 1280, height: 900 },
  deviceScaleFactor: 1,
  locale: 'en-US',
  timezoneId: 'UTC',
  colorScheme: 'light',
  reducedMotion: 'reduce'
});
const page = await context.newPage();

await page.goto('http://localhost:3000/ocr-fixture', {
  waitUntil: 'domcontentloaded'
});

// Prefer an app-owned readiness marker over an arbitrary sleep.
await page.locator('[data-fixture-ready="true"]').waitFor();
await page.evaluate(() => document.fonts.ready);

// Freeze visual motion after the app has rendered its deterministic state.
await page.addStyleTag({
  content: `*, *::before, *::after {
    animation: none !important;
    transition: none !important;
    caret-color: transparent !important;
  }`
});

await page.waitForLoadState('networkidle');
await mkdir('fixtures', { recursive: true });

await page.screenshot({
  path: 'fixtures/page.png',
  fullPage: true,
  type: 'png',
  scale: 'css'
});

const metadata = {
  route: 'http://localhost:3000/ocr-fixture',
  viewport: { width: 1280, height: 900 },
  deviceScaleFactor: 1,
  browser: await browser.version(),
  playwright: process.env.npm_package_devDependencies_playwright ?? 'record from lockfile',
  locale: 'en-US',
  timezone: 'UTC',
  colorScheme: 'light',
  reducedMotion: 'reduce',
  fontRevision: 'record your image/package revision',
  contentRevision: 'fixture-data-v1'
};
await writeFile('fixtures/page.json', JSON.stringify(metadata, null, 2));
await browser.close();

fullPage: true tells Playwright to capture the full scrollable page instead of the currently visible viewport. scale: 'css' keeps output dimensions tied to CSS pixels, which is generally easier to keep stable for OCR assertions. Use device-pixel scaling only when the fixture intentionally tests high-DPI output; then pin and record the device scale factor as part of the contract.

Make readiness explicit

The data-fixture-ready marker should be set only after the page has received its fixed data, rendered the components that depend on it, and finished any layout work that affects the image. If the page has several independent sections, wait for each section or for a single application-level promise. A fixed delay can hide races and becomes either too short on a busy CI worker or unnecessarily slow on a fast one.

Handle fonts and lazy content

Waiting on document.fonts.ready confirms that the browser has finished tracking web-font loads, but it does not make an unavailable font appear. Package the required fonts in the test image or serve them from a deterministic local origin. For lazy content, expose a test-only “all content loaded” signal, or scroll through the page and wait for each required image’s complete state before taking the final shot. Do not accept a baseline that contains a placeholder or a partially decoded image.

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

Capture and validate the whole document

Check the image dimensions

After capture, verify that the file exists and that its width matches the expected CSS viewport width when using scale: 'css'. The height should correspond to the rendered document at the fixture’s content revision. A sudden height change is often the first sign of a missing font, a changed line wrap, a collapsed section, or content that did not load.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Run OCR and retain geometry

Pass the saved PNG to your OCR engine and store normalized text plus bounding boxes for important labels, headings, and values. Keep text assertions tolerant of harmless whitespace differences, but make geometry assertions explicit where placement matters. For example, assert that a heading is present and that its box remains within the expected region; do not rely on one giant exact-text string to detect every failure.

Keep the original for diagnosis

When OCR fails, retain the candidate image, OCR output, and metadata alongside the test report. Comparing a crop around the failed region is faster than trying to infer the cause from an error message. Never overwrite the reviewed baseline automatically.

Use Playwright Test for visual baselines

Playwright Test can create a reference screenshot and compare later runs with expect(page).toHaveScreenshot(). Treat the visual baseline as a reviewed artifact: update it only after deciding that the rendering change is intentional and updating the corresponding OCR expectations. Keep the OCR test and the visual test logically separate so a font antialiasing change does not obscure a genuine text-recognition regression.

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

A practical sequence is:

  1. Render the deterministic route and wait for its readiness signal.
  2. Capture the full-page PNG with the same viewport, scale, browser, and font environment used by the baseline.
  3. Run OCR and compare expected text and selected bounding boxes.
  4. Run the visual comparison against the reviewed image.
  5. If either check fails, archive the candidate image and metadata before investigating.

Playwright or direct Chrome DevTools Protocol?

Both approaches can produce a full-page image, but they solve different problems.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Decision point Playwright Chrome DevTools Protocol
API level High-level browser and test API, with navigation, locators, waits, context settings, and screenshot options. Lower-level protocol calls; Chromium exposes Page.captureScreenshot.
Browser coverage Designed for test automation across its supported browser engines, so the same fixture workflow can be exercised beyond Chromium. Best fit when an existing harness already speaks the Chromium protocol.
Screenshot controls Convenient full-page, element, format, scale, and buffer options. Direct protocol control, useful when you need a parameter Playwright does not expose or must integrate with an existing CDP session.
Reproducibility support Browser contexts, locale, timezone, reduced motion, readiness waits, and test metadata fit naturally into one fixture script. You must build equivalent environment setup, waiting, and metadata handling around protocol calls.
Baseline assertions Playwright Test includes expect(page).toHaveScreenshot(). Pair the captured bytes with your own image and OCR assertion framework.

Choose Playwright as the practical default for new OCR fixtures. Choose direct CDP when your harness already operates at protocol level or needs Chromium-specific control. Whichever API you use, the determinism work—fixed data, fonts, browser image, viewport, and timing—matters more than the capture call.

Common causes of changing baselines

Different fonts or operating-system images

Font fallback changes glyph widths and line breaks. Use the same container or VM image, install the same font packages, and record their revision. Do not approve a baseline generated on a laptop if CI uses a different rendering stack.

Animations, carets, and clocks

A blinking caret or a frame captured halfway through a transition changes pixels on every run. Disable motion, hide carets, and replace live clocks with fixed values before capture.

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

Lazy images and remote assets

A network race can leave a placeholder in one run and the decoded image in another. Serve fixture assets locally where possible, wait for an application-owned ready state, and verify required images before the screenshot.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Sticky headers and scroll behavior

Full-page stitching can expose sticky elements repeatedly or at a different position than expected. Decide whether the fixture should include the sticky element once, on every captured segment, or hidden; configure the page specifically for that test rather than accepting whichever behavior the production page happens to produce.

Ads, personalization, and random identifiers

Remove third-party content from the fixture route. Seed random generators or replace generated IDs with fixed values. A visually unrelated ad can alter page height and move every OCR box below it.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting checklist

Symptom Likely cause Fix
The image contains only the visible viewport. The screenshot call omitted the full-page option or used a different API path. Use page.screenshot({ fullPage: true, ... }) and confirm the document has scrollable content.
Text wraps differently on CI. Different browser, OS, font, viewport, locale, or device scale. Run the pinned browser in the pinned image, install exact fonts, set context values explicitly, and record them.
The script waits forever for network idle. Analytics, a WebSocket, or another long-lived request never becomes idle. Wait for an application-owned readiness marker and use network-idle only as a secondary signal.
OCR misses text near the bottom. Lazy content did not load before capture, or the image is lossy or scaled unexpectedly. Use PNG, wait for all required content, keep scale: 'css' for stable dimensions, and inspect the original image.
Every pixel below one component shifted. A font, image, or dynamic section changed its height. Compare metadata and page height first; then inspect font loading, asset completion, and fixed test data.
Visual comparison fails but OCR passes. Antialiasing, color, spacing, or non-text decoration changed. Review the candidate crop and decide whether the visual change is intentional; OCR success does not prove layout stability.
Visual comparison passes but OCR fails. Text content changed without a large pixel difference, or OCR preprocessing is unstable. Inspect OCR output and bounding boxes separately, then fix the content fixture or OCR normalization.
The capture is too large or slow for the CI job. A very tall document requires more memory and encoding work. Reduce fixture data to the required scenario, capture a specific element when that is the real test, or split independent documents; keep one representative full-page fixture for end-to-end coverage.

Performance, reliability, and maintenance

  • Reuse the browser process: launch once per test worker and create isolated contexts for fixtures. This avoids repeatedly starting a browser while preserving deterministic context settings.
  • Prefer local assets: remote fonts, images, ads, and APIs add latency and failure modes. A fixture should fail because the application changed, not because a third-party host was slow.
  • Keep fixture routes small but representative: include long text, wrapped headings, images, tables, and the lazy-loading behavior your OCR code must handle, but remove unrelated production personalization.
  • Version metadata with the image: when a browser or font update is intentional, regenerate and review the baseline as a deliberate migration.
  • Use deterministic naming: include the route and content revision in the fixture path so parallel jobs cannot overwrite one another.
  • Do not hide failures with retries: a retry may produce a different frame and conceal a race. Fix readiness, motion, or data determinism instead.

Or skip the browser setup

For a hosted capture, ScreenshotNeo accepts one GET request and returns a PNG, JPEG, WebP, or PDF. Its cleanup steps can accept the cookie or consent banner like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

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

Use the ScreenshotNeo API documentation for authentication and options. The same endpoint can also set full-page capture, a CSS selector, viewport and device preset, retina scale, dark mode, custom CSS or JavaScript, click and wait conditions, request blocking, headers, cookies, user agent, authorization, timezone, geolocation, transparent background, resizing, a chosen cache TTL, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, and usage reporting. For OCR fixtures, keep the target page and its data deterministic on your side, and record the returned verdict and billing headers with the image.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Every plan includes the features above. The Free plan provides 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots, followed by Growth at $15 for 15,000, Pro at $39 for 60,000, Scale at $99 for 250,000, and Business at $249 for 1,000,000. Yearly billing gives two months free. If you want hosted full-page fixtures without maintaining browser installation and cleanup code, sign up for the free 1,000-shot plan.

Fixture review checklist

  • The route serves fixed data and a documented content revision.
  • The browser, Playwright version, operating-system image, fonts, viewport, locale, timezone, color scheme, and reduced-motion setting are pinned or recorded.
  • Animations, transitions, carets, clocks, random IDs, ads, and personalization are disabled or fixed.
  • Application data, web fonts, lazy images, and layout are ready before capture.
  • The screenshot uses fullPage: true; PNG and scale: 'css' are used unless the test intentionally covers another format or scale.
  • Image, OCR text, selected bounding boxes, and metadata are stored together.
  • Visual baselines are reviewed before updates, and OCR assertions are evaluated independently.

Frequently Asked Questions

Does full-page capture include browser controls or the desktop?

No. It captures the rendered document’s scrollable page. Browser chrome and the operating-system desktop are outside the page image.

When should a fixture use JPEG or WebP instead of PNG?

Use JPEG or WebP only when the test specifically covers that output format or storage trade-off. PNG is the safest default for OCR because it is lossless.

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

Can I use a full-page fixture for both OCR and visual regression?

Yes, but keep the assertions separate: OCR checks recognized text and geometry, while visual comparison checks rendered pixels. Either can detect a change the other misses.

What is the main reason to choose CDP over Playwright?

Use CDP when an existing harness already operates at the Chromium protocol level or requires direct protocol control. For a new fixture workflow, Playwright usually supplies more of the navigation, waiting, context, and baseline infrastructure.

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.