Cypress - Assertions
Why does the assertion
cy.get('.list').should('have.length', 0) sometimes pass even if the elements are not visible?cy.get('.list').should('have.length', 0) sometimes pass even if the elements are not visible?cy.get() workscy.get() selects elements regardless of visibility, so length counts all matching elements. -> Option Dcy.get() counts all matched elements [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions