Can someone help me with this Cypress error?
Cypress Error: Timed out retrying: expected '<div.sub-categories-list>' to be '0 visible'
This element '<div.sub-categories-list>' is not visible because it has CSS property: 'position: fixed' and its being covered by another element:
undefined
The element you are asserting is not visible within the viewport and probably have to be scrolled to in order to be visible.
Cypress do not automatically scroll to elements during the test run, but you can use scrollIntoView()
, so write your assertion like this:
cy.get('#yourElement')
.scrollIntoView()
.should('be.visible')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With