Then I see visible "subjectsText"

The Then I see visible [subjects] step asserts that one or more named locators are currently visible on the page. Each name is resolved from the CSS or XPath selector registry, and the step waits up to 5 seconds for every matched element to reach the visible state using Playwright's auto-retrying waitFor. This means the step tolerates brief rendering delays, animations, and lazy-mount patterns without needing an explicit wait step before it.

Multiple names can be checked in a single step by separating them with commas or the word and. Every name is checked independently and all failures are collected before the step throws, so you see the full list of invisible elements in one error message. Names must be registered before this step runs, either via Given I define css selectors:, When I add "[name]" selector for "[css]" css selector, a JSON selector file, or worldParameters.selectors.css.

Accepted phrasings

Then I see visible [subject]
Then we see visible [subject]
Then see visible [subject]
Then I see visible [subject], [subject2]
Then I see visible [subject] and [subject2]
Then I see visible [subject], [subject2] and [subject3]

Examples

Then I see visible header
Then I see visible nav, footer
Then I see visible logo and search
Then I see visible hero, content and sidebar

In a real scenario

Scenario: Homepage shell elements are all present at desktop width
  Given I define css selectors:
    | site header  | header.site       |
    | main nav     | nav[role="navigation"] |
    | main content | main.content      |
    | footer       | footer.site       |
  And I am viewing the site on a xl screen
  When I go to "https://example.org/"
  Then I see visible site header
  And I see visible main nav
  And I see visible main content
  And I see visible footer

Related steps

Back to Selectors Steps