Skip to content

Look checks

A look check compares a picture of the page, or of one element, with a picture saved before: the reference. It catches what other checks miss: a broken layout, a missing image, a button that changed colour.

  • The whole page, or what is on screen: choose Add a step, then Check the page, and in What is checked, choose looks the same.
  • One element (a header, a product card, a chart): choose Check an element, then looks the same, and say which element (see Find the right element).

Then fill in:

  • Name of the reference: each look of a plan has its own name, for example Home or Cart.
  • The whole page (for a page look): tick it to compare the whole page, from top to bottom. Unticked, only what is on screen is compared.

The step reads, for example: Verify that the page looks the same as “Home”.

A look check has nothing to compare with the first time. So the first run takes the picture, saves it as the reference, and passes. The report says so: “This run saved 1 new reference: the next runs compare with it.”

From then on, each run compares with that reference.

References are saved in the project, in allgreen/references/, one picture per look, browser, device and system. A page never looks exactly the same in Chromium and in WebKit, on a computer and on a phone, or on Windows and on macOS: each one gets its own reference. So the first run on another system (macOS after Windows, for example) saves new references too.

Some parts of a page change at every visit: today’s date, a carousel, an ad, a “3 people are viewing this” counter. They would fail the check every time. Leave them out:

  1. Choose Add an area to ignore.
  2. Describe the area like any element (for example Its kind and name: kind Region, name Latest news).

Each area to ignore is covered with a plain box before the comparison. You can add several; Remove area to ignore takes one away.

If a look check fails with “The page kept changing”, add the parts that move to the areas to ignore.

How strict sets how much difference is allowed:

  • Strict: the very same: not a single dot may differ.
  • Normal: a tiny difference passes, such as the smoothing of letters. The usual choice.
  • Loose: a little more difference passes. For pages that vary slightly from run to run.

When the page no longer looks like its reference, the check fails. Open the failure in the report: it shows three pictures side by side.

  • Reference: the saved picture.
  • Obtained: what the page looked like in this run.
  • Differences: where they differ, highlighted.

The sentence says how much changed, for example: The look changed: 4.2% of the area differs.

Then decide:

  • It is a bug: fix the site, and run again.
  • The change is on purpose (a new design, a new photo): choose Accept the new look. The obtained picture becomes the reference: “Accepted: the next runs compare with this look.”

When many looks changed at once, for example after a redesign, Accept every new look at the top of the report accepts them all in one go.