Great use of wait-until if you have detached dom problems

This issue has been tracked since 2021-09-22.

I want to share this solution to my problems.

cy.waitUntil(() =>
      cy.get('.someSelector')
        .as('someAlias')
        .wait(10) // for some reason this is needed, otherwise next line returns `true` even if click() fails due to detached element in the next step
        .then($el => Cypress.dom.isAttached($el)),
    { timeout: 1000, interval: 10 })

      .get('@someAlias')
      .click()
NoriSte wrote this answer on 2021-09-23

Thanks for sharing, I keep this issue as a reference in case other users land here asking something similar 😊

I hope Cypress fixes this behavior soon 😊

More Details About Repo
Owner Name NoriSte
Repo Name cypress-wait-until
Full Name NoriSte/cypress-wait-until
Language JavaScript
Created Date 2019-04-27
Updated Date 2023-03-19
Star Count 635
Watcher Count 8
Fork Count 24
Issue Count 3

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date