Checks reference
A check on an expect entry makes the assertion deterministic — it's verified directly against the page with no model call, no cost, and no ambiguity. Omit the check and the model adjudicates the assertion against the page's visible text and a screenshot. Prefer a check whenever the expectation has an obvious, checkable shape.
expect:
- { id: a1, assert: "we land on the account page",
check: { kind: url, path_is: "/account" } }There are four check kinds: url, visible_text, absent_text, and element_visible.
url — match the address
Verifies the current URL or path after the steps run.
| Field | Meaning |
|---|---|
path_is | The path must equal this (trailing / is ignored). |
contains | The full URL must contain this substring. |
- { assert: "we land on /account", check: { kind: url, path_is: "/account" } }
- { assert: "the url carries the order id", check: { kind: url, contains: "order=" } }visible_text — text is present
Verifies that a string appears in the page's visible text.
| Field | Meaning |
|---|---|
contains | This substring must be present in the visible text. |
selector_hint (optional) | Scope the check to a specific element (see below). |
equals (with selector_hint) | The hinted element's text must equal this exactly. |
- { assert: "a confirmation is shown", check: { kind: visible_text, contains: "Account created" } }
- { assert: "the heading is exactly 'Welcome'",
check: { kind: visible_text, selector_hint: "h1", equals: "Welcome" } }Without a selector_hint, the substring is matched against the whole page's text — robust to layout churn. With one, the check resolves that element live (this is where self-healing applies to a scoped assertion).
absent_text — text is NOT present
Verifies that none of a list of strings appear. Great for catching error banners or a wrong value that slipped through with an HTTP 200.
| Field | Meaning |
|---|---|
any_of | A list of strings; the check fails if any of them is present (case-insensitive). |
- { assert: "no error banner is shown", check: { kind: absent_text, any_of: ["error", "failed"] } }
- { assert: "no USD is shown (should be EUR)", check: { kind: absent_text, any_of: ["USD", "$"] } }This is how Tripwire catches "silent" data bugs
A German checkout that shows USD instead of EUR returns a perfectly healthy HTTP 200 — nothing throws. An absent_text: ["USD"] check turns that invisible data bug into a hard failure, which then gets root-caused to the backend.
element_visible — an element is visible
Verifies that a specific element is present and visible. Requires a selector_hint.
| Field | Meaning |
|---|---|
selector_hint | The element to check (resolved live against the page). |
- { assert: "the card field is present", check: { kind: element_visible, selector_hint: "#card-number" } }When to skip the check (let the model adjudicate)
Leave check off when the expectation is subjective or hard to pin to a string — "the dashboard looks correct", "the chart reflects the new data". The model then renders a strict pass/fail verdict against the page's visible text and a screenshot, so it judges what a user would actually see. A missing element or a wrong value is a fail.
- { assert: "the welcome screen shows the user's correct plan and renewal date" }This is also exactly how the MCP tripwire_check tool and ad-hoc test-url runs decide expectations: obvious URL/text shapes are checked deterministically; everything else is adjudicated by the model.
Notes on portability
When you export a suite to portable Playwright, each deterministic check compiles to a real Playwright assertion:
| Check | Compiles to |
|---|---|
url (path_is / contains) | await expect(page).toHaveURL(...) |
visible_text (contains) | await expect(locator).toContainText(...) |
visible_text (equals + selector_hint) | await expect(locator).toHaveText(...) |
element_visible (selector_hint) | await expect(locator).toBeVisible() |
absent_text (any_of) | await expect(body).not.toContainText(...) per string |
Assertions with no deterministic check export as a clearly-marked // TODO assert: comment carrying the plain-English text, so a human can finish them.
Next: Writing Tests · Runs & assertions