The Then I should see group collects every step that checks whether text, elements, or patterns are present or absent on the current page. These steps live in assertion.steps.js and cover the most common assertions in a test suite: plain text on the page, text inside a specific element, regex matches, element existence by label or attribute, and the rendered HTML response.
All steps in this group accept both I and we as the subject pronoun, and the positive form uses Playwright's built-in auto-wait so the assertion retries for up to five seconds before failing. The negative form reads the page text once and asserts immediately - it does not retry. Use the positive form when content may appear after a brief delay, and the negative form when you want to confirm something is definitely absent right now.
Steps in this group
- Then I should see "text" - plain page text (positive)
- Then I should not see "text" - plain page text (negative)
- Then I should see text matching "pattern" - regex on full page
- Then I should not see text matching "pattern" - regex on full page (negative)
- Then I should see text matching "pattern" in element
- Then I should not see text matching "pattern" in element
- Then I should see a/an "label" element
- Then I should not see a/an "label" element
- Then I should see "text" in the "element" element
- Then I should not see "text" in the "element" element