Assertion Steps
Verify that your application is working correctly
Assertion steps verify that your application is in the expected state. Use them to check text, element states, URLs, and more.
AI Assertion
Verify conditions using natural language descriptions — the most powerful assertion tool.
Configuration:
assertion(required): Natural language assertion to verify
Best for: Visual states, dynamic content, context-dependent conditions like "The cart looks empty" or "The success message is showing."
Learn more about AI Assertions.
Assert URL
Verify that the current page URL matches a specific pattern.
Configuration:
urlRegex(required): Regular expression to match against current URL
Assert Text
Check that an element contains specific text content.
Configuration:
elementDescription(required): Description of element to check text intextRegex(required): Regular expression to match element textelementReference(optional): Direct element reference with DOM/UUID or XPath
Assert State
Verify the state of elements (visible, hidden, enabled, disabled).
Configuration:
elementDescription(required): Description of element to check statestate(required): Expected element state (enabled,disabled,visible,hidden)elementReference(optional): Direct element reference with DOM/UUID or XPath
Assert Attribute
Check that elements have specific HTML attributes and values.
Configuration:
elementDescription(required): Description of element to check attributeattributeName(required): Name of attribute to checkattributeValue(required): Expected attribute valueelementReference(optional): Direct element reference with DOM/UUID or XPath
Assert Download
Verify that files are downloaded with expected names.
Configuration:
downloadName(required): Expected download filename
When to Use Which Assertion
| Assertion | Best for |
|---|---|
| AI Assertion | Complex, context-dependent validations |
| Assert URL | Navigation, redirects, query parameters |
| Assert Text | Exact error messages, prices, IDs |
| Assert State | Button enabled/disabled, element visibility |
| Assert Attribute | Accessibility attributes, CSS classes, link targets |
| Assert Download | File downloads, exports |
General rule: Start with AI Assertion for complex validations. Use traditional assertions for precise, technical checks. Combine both for comprehensive coverage.
