What is the standard Cypress-way to wait for a 'please wait' modal to close?
Easy to check it is there, but without using cy.wait(ms)
, how can I cause Cypress to keep checking for a period of time, to see if the element has been removed from the DOM, or made invisible?
You can simply use should
to assert it doesn't exist, and Cypress will wait for the element until it's removed from DOM. If you need to override the default 4s
timeout, you can pass it to the previous command:
cy.get( selector, { timeout: 10000 }).should("not.exist");
try using cy.get(selector).should("not.be.visible");
it worked for me
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