Cypress · Junior · Question 18 of 75
What does .should('be.visible') do?
- 1Checks visibility once and fails immediately if not
- 2Scrolls the page until the element appears in view
- 3Asserts visibility, retrying until it passes or times out
Show the answer
Correct answer: Asserts visibility, retrying until it passes or times out
Explanation
Assertions chained with .should() make Cypress retry the previous query, which handles content that appears later.