Assertions
Assertions are the checks that decide whether a test case passes or fails.
An assertion is a check that decides whether a test passes. How you express one depends on the kind of test case:
- In a Simple test case, you state the check in plain language as part of the task: "...and confirm the dashboard shows 'Welcome back'."
- In an Advanced test case, an Assert step targets a located element (from the element registry) and runs a specific check against it.
A test case stops at the first failed assertion and reports exactly which check didn't hold.
What you can assert
Advanced assertions are element-level checks, grouped into families:
- Presence & visibility: is the element attached, visible, in the viewport, or empty?
- State: checked, enabled, disabled, editable, focused.
- Text & value: exact text, contains text, or input value(s).
- Attributes & styling: an attribute, class, CSS property,
id, or JS property. - Accessibility: ARIA role, accessible name, description, or error message.
Any assertion can be negated (assert the opposite) and given an optional timeout to wait for the condition to hold.
Because Advanced assertions are element-level, page-wide checks like "did we land
on /dashboard?" are best expressed in a Simple task, or by asserting on an
element that only exists on the destination page.
Auretis assertions mirror Playwright's locator assertions. For the exact
behavior of each check, see the
Playwright LocatorAssertions reference.
Assert the heading "Welcome back" is visible
Assert the "Place order" button is enabled
Assert the cart badge contains "3"Assert at checkpoints, not just at the end. Intermediate assertions make a failure pinpoint the moment behavior diverged.