# Visual regression and element drift

Dokimore documentation · Recording and self-healing · Updated 2026-11-01 · 6 min read

Written for: SDETs and automation engineers, Developers who own their tests · Where it applies: every market

> Capture a baseline screenshot of a page, then compare a later version against it. The difference is a real pixel comparison that returns a percentage, a pass or fail against the threshold you set, and an image that highlights exactly which pixels moved. A second tab watches for DOM element drift instead of pixels. Available on Solo Pro and above.

## What it does

Visual regression catches an unintended UI change that a functional test would pass straight through: a shifted button, a broken layout, a colour that changed by mistake. You take a baseline of a page you are happy with, and every later comparison tells you whether the page still looks the same and, if not, precisely where it differs.

## Capture a baseline, then compare

1. Enter the URL and capture a baseline. A headless Chromium browser loads the page and takes a full-page screenshot, which is stored for you.
2. Later, compare a live URL against that baseline. The platform loads the page again and runs a pixel-level comparison against the stored image.
3. Read the result: a diff percentage, a pass or fail against your threshold, and a diff image with the changed pixels highlighted.

## Element drift, not just pixels

The UI and UX testing tab works at the DOM level. It captures elements on the page, matches them against the last baseline, keeps a rolling history of the last few states per element, and runs a rules-based audit. This catches a change to an element that a whole-page pixel diff might average away.

## Mask the parts that always change

A page with an ad slot, a carousel or a live clock would fail a naive pixel diff every time. When you capture a baseline you can set the viewport size, the comparison threshold, a selector to wait for before the shot, and ignore regions that mask the areas you expect to change. That keeps a comparison meaningful instead of noisy.

## What it does not do today

- It is Chromium only. There is no true cross-browser visual diffing against Firefox or WebKit yet, so do not rely on it to catch a rendering difference that is specific to another engine.
- There are no per-dimension AI scores. An earlier build showed fabricated semantic, layout and colour scores; those were removed. The only score is derived from the real pixel difference.
- A comparison needs a baseline first. It is a capture-then-compare workflow, not a one-shot compare of two arbitrary URLs.

## Questions people ask about this

### Can it diff across browsers?

Not today. Capture and comparison run in Chromium only. Cross-browser visual diffing is not available, so a guide or a claim that implied it would be wrong.

### Is it on the Free plan?

No. Visual regression is included on Solo Pro, Team and Enterprise. The Free plan does not include it.

This guide is about the test recorder and self-healing: https://dokimore.com/product/test-recorder

Source: https://dokimore.com/documentation/visual-regression
