Skip to content

Understand a failure

A failed plan is good news half the time: it found a bug. The other half, the site changed and the plan must follow. The report gives you what you need to tell which.

In the report’s grid, choose a Failed box. Its detail opens.

The detail of a failed plan

From top to bottom, you see:

  • The step that failed, as a sentence: for example, Step 3: Verify that “Free delivery” is visible.
  • Why, in one sentence: for example, “Free delivery” is not shown on the page. Every sentence is listed in Failure messages.
  • The page when the step failed: a screenshot of the page at that moment. Click it to see it larger. Start here: most failures are obvious on the picture.
  • Video of the failed try: what the browser did, up to the failure. Useful when the page changed quickly (a message that showed and went away). Download the video keeps a copy.
  • First lines of the error: Playwright’s own message, for a developer.
  • The trace: a full recording of the run. Open the trace replays it step by step, with the page, the clicks and the network at each moment. Download the trace saves it, to send to a developer.

A box that says Passed, unstable failed once, then passed on a new try: see flaky results.

Look at the screenshot and ask: is the site wrong, or is the plan wrong?

  • The site is wrong (a missing button, a wrong price, an error page): you found a bug. Send the step’s sentence and the screenshot to whoever fixes the site.
  • The plan is out of date (a button renamed, a page moved): fix the step. Edit step 3 (with the step’s number) opens it straight in the editor.
  • The page was not ready yet (the screenshot shows a loading spinner): raise Patience in Project settings, or add a Wait until… step before it.

Then run it again: Run this plan again from the detail, or Run the failed plans again at the top of the report to run every failed plan once more.

What the detail says What it usually means What to do
No element matches: check its text or its kind of element on the page. The text changed, it is spelled differently, or the element is of another kind (a link, not a button). Compare the step with the screenshot. Try Choose in the page to describe it by clicking it. It may also be in an embedded frame.
3 elements match: say which one (its position, or the area it is in). Several elements fit, and Allgreen will not guess. Narrow it: see When several elements match.
“Order confirmed” is not shown on the page. A check failed: the page is not in the state you expected. If the screenshot shows the right page, the text may differ. If not, it is likely a bug.
The look changed: 4.2% of the area differs. A look check found a difference with its reference. Compare the pictures. Accept the new look if the change is wanted.
The site cannot be reached at https://…: check that it is running and the address is right. The browser could not open the site. Start the site, and check the Site address in Project settings.
The step took too long and was stopped. A page never finished loading, or the plan ran out of time. Check the site’s speed. Raise Patience. Avoid long Wait a moment steps.
The page had an error: “…”. Fail when the page has an error is on, and the page’s code had an error. Show it to a developer (see Banners and surprises).

Failure messages lists every message, with what to do.

A plan can pass on Chromium and fail on WebKit, or pass on the computer and fail on a phone. Compare the screenshots of the two boxes:

  • On a phone, a menu is often hidden behind a “☰” button, and a button may be lower on the page.
  • A difference between browsers can be a real bug for the people using that browser.

To see it happen, use Run differently…, then Watch it in a browser window on that browser and device, with Step by step (see Running your plans).