Assertion
A check embedded in a test that verifies the application is in an expected state, failing the test when the condition is not met.
What is Assertion?
What is Assertion?
An assertion is the point in a test where you declare what should be true—an element is visible, a URL matches, a value equals what you expect—and let the test fail loudly if reality disagrees. Assertions turn a script that merely clicks through a flow into a test that actually validates behavior. In Playwright, web-first assertions automatically wait and retry until the condition is met or a timeout expires, which removes a common source of flakiness. QI generates meaningful assertions from your recorded flow so exported specs verify outcomes, not just navigation.