Execution Trace Quiz - 3 Questions
Test your understanding
What does the test verify before clicking the hidden button?
.should('not.be.visible') checks if an element is hidden or not visible on the page..click() and .type() perform actions, not visibility checks. .should('be.enabled') checks if an element is enabled, not visibility..should('not.be.visible') [OK]{ force: true } to override visibility checks.{ visible: true } or { hidden: false } are invalid in Cypress click command. Clicking without force on hidden element fails.cy.get('#secret').should('not.be.visible')
cy.get('#secret').click()#secret is hidden.{ force: true } causes Cypress to fail the test because the element is not interactable.cy.get('.hidden-link').click(){ force: true } to .click() forces the click on the hidden element, fixing the error.#agree. Which Cypress code correctly checks it and verifies it is checked?.check() requires { force: true } to interact with it..should('be.checked') confirms the checkbox is checked.Pass the test and this pattern moves unknown