Free tools Windows power users keep installed
One-click scans. No signup required.
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
Make the page’s time deterministic before navigation if the timestamp should appear in the screenshot. For a fixed displayed date, use page.clock.setFixedTime(); if the timestamp is irrelevant to the visual test, mask or hide that region instead. The right fix depends on whether the time itself is under test and whether page timers need to advance.
Freeze the displayed date while leaving timers running
For a simple stable timestamp, set a fixed time before page.goto(). Playwright documents that this fixes Date.now() and new Date() while allowing timers to continue running. Choose a date and time that produce the intended display.
import { test, expect } from '@playwright/test';
test('renders a stable timestamp', async ({ page }) => {
await page.clock.setFixedTime(new Date('2024-02-02T10:00:00'));
await page.goto('http://localhost:3000');
await expect(page).toHaveScreenshot();
});
Set the clock before loading the page so application code reads the controlled time from the start. The example uses a local date-time string; if your app formats dates according to locale or timezone, make those inputs consistent as well. The clock controls alone do not configure an application’s locale or timezone. See Playwright’s Clock documentation.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Choose the fix that matches what the test should verify
The timestamp should be stable, but timers should keep running
Use page.clock.setFixedTime(). This is the simplest option when a test needs a predictable date display but does not need to control the progression of intervals, timeouts, or other timers.
#1 Best Overall
Timer-driven behavior must progress under test control
Use page.clock.install() when testing countdowns, scheduled updates, or timeout-driven UI. Install it before navigation and before making other clock-related calls; Playwright warns that calling install() after other clock operations can cause undefined behavior. The guide recommends initializing slightly before the intended test time so page-load timers can run normally, then pausing or advancing time with the clock methods documented by Playwright.
Change system time without triggering timers
page.clock.setSystemTime() is an advanced option for shifting system time without firing timers. Prefer setFixedTime() for an ordinary stable displayed date, and use controlled timer progression when the test needs to verify time-based behavior.
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
The changing timestamp is outside the assertion
If the time is not part of the behavior being tested, exclude its region from the screenshot comparison rather than making it a test dependency. Use toHaveScreenshot({ mask: [...] }) with the timestamp locator, or use screenshot-only CSS through stylePath to hide it. A mask covers the locator’s bounding box, so apply this only when that region is intentionally outside the assertion. Playwright documents both approaches in its screenshot assertions and visual comparisons guides.
Recommended Free Tools
Diagnose a failure that remains
Check whether the timestamp is actually controlled
Inspect the screenshot diff and determine whether the changing text comes from browser-side Date calls, a timer-driven update, or another source such as server-rendered content. Playwright’s clock controls support the documented clock APIs, but they do not establish how a particular application obtains its timestamp. Confirm the setup happens before navigation and choose a clock method suited to the behavior.
Rank #3
Inspect actual, expected, and diff images before updating
toHaveScreenshot() waits for two consecutive page screenshots to match before comparing against the stored expectation. This helps with capture instability; it does not make a changing application timestamp constant. Review the actual image, expected image, and diff before accepting a baseline change. Playwright’s Trace Viewer can show screenshot diffs, actual and expected images, action details, and logs. Update snapshots with --update-snapshots only after confirming the visual change is intended.
Keep the rendering environment consistent
Browser rendering can vary with host operating system, browser version, settings, hardware, power source, and headless mode. Generate and compare baselines in the same environment, or use browser- and platform-specific baselines when appropriate. Playwright’s guidance is: “For consistent screenshots, run tests in the same environment where the baseline screenshots were generated.” See Visual comparisons and Trace Viewer.
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Common timestamp screenshot failures and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| The date or time differs on each run | The page reads the current time during rendering. | Set page.clock.setFixedTime() before navigation if the display should be stable, or mask the timestamp if it is irrelevant. |
| A countdown or scheduled update still changes unexpectedly | The test needs control over timer progression, not only a fixed current date. | Install the clock before navigation and use its documented pause or advance methods. |
| The timestamp is masked, but other pixels still differ | The remaining difference may be another dynamic element or a rendering-environment change. | Inspect the diff and Trace Viewer; check browser and host consistency. |
| A fresh baseline keeps changing | The update may be accepting an unintended timestamp or environment difference. | Do not update snapshots until you verify the displayed time and intended visual behavior. |
Or skip the browser setup
For a standalone website screenshot, ScreenshotNeo returns a screenshot or PDF from one GET request, without requiring you to set up a Playwright browser. It accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents.
Example using cURL (see the ScreenshotNeo API documentation):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo is a website screenshot API, not a replacement for a Playwright test that needs to control application time or assert interactive behavior. It offers 1,000 screenshots a month free with no card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo, or sign up for 1,000 free screenshots a month with no card.
Best Value
Frequently asked questions
Should I freeze time or mask the timestamp?
Freeze time when the displayed date is part of the behavior your test should verify. Mask or hide it only when it is deliberately outside the screenshot assertion.
Does setFixedTime() stop timers?
No. It fixes the perceived current time while allowing timers to continue running.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
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.

