Back to Blog

Why Playwright's Built-In Visual Testing Isn't Enough

Why Playwright's Built-In Visual Testing Isn't Enough

Playwright's expect(page).toHaveScreenshot() is a solid starting point. Built-in, no dependencies, cross-browser. But it's a screenshot assertion, not a visual testing platform.

What's Missing

1. No Review Dashboard

Failed tests produce three image files in test-results. For 50 failures after a CSS refactor, that's unusable. You need a dashboard showing all diffs side-by-side with approve/reject.

Lastest review dashboard

2. No Team Collaboration

Baselines are files in your repo. No approval workflow - whoever runs --update-snapshots decides the baseline.

3. Single Diff Algorithm

Pixel-by-pixel comparison - fast but prone to false positives from font rendering and anti-aliasing. You need SSIM for structural comparison, Butteraugli for perceptual diffs, and OCR-aware text handling.

Two-column comparison: Playwright toHaveScreenshot() gives 3 image files per fail, 1 pixel diff engine, basic waits; Lastest adds a review dashboard, 3 engines plus OCR, a stabilization suite, and stays free self-hosted
A screenshot assertion is one feature; a visual platform is the dashboard, diff engines, and stabilization built around it.

4. No AI Test Generation

codegen records one flow at a time. For comprehensive coverage, you need AI that generates your entire suite.

5. No Stabilization

Only waitForLoadState and waitForSelector. Dynamic apps need timestamp freezing, random seeding, third-party blocking, auto-masking, and burst capture.

6. Baseline Bloat

100 tests × 3 browsers × 2 OS = 600 PNG files in your repo. Binary commits bloat git history.

The Gap in Practice

A developer refactors Card used on 30 pages. 30 tests fail.

Flow split: 30 failing tests fork into the Playwright-by-hand path (open 90 images, commit 30 binaries) versus the Lastest path (dashboard, AI classifies 28 intentional and flags 2, approve and done)
The same 30-test failure is a manual 90-image slog in Playwright but an AI-triaged one-click approval in Lastest.
  • Playwright: Open 90 images individually. Compare manually. Commit 30 binaries.
  • Lastest: Dashboard shows all diffs. AI classifies 28 as intentional, flags 2 as unintended. Approve. Done.

Summary

CapabilityPlaywrightLastest
Screenshot comparisonYesYes
Review dashboardNoYes
Team approvalNoYes
AI test generationNoYes
Diff engines13 + OCR
StabilizationBasic waits12 features
CostFreeFree