Solving The Element Is Detached From DOM Error In Cypress

1 · Gleb Bahmutov · Aug. 26, 2021, 1:09 p.m.
Many people complain about the dreaded "Element is detached from DOM" error in Cypress, see #7306. I have recorded the video showing the problem and the possible solutions below.Tip: I have described previously this particular scenario in the blog post When Can the Test Submit a Form? which is a part of my series of blog posts about test flake.When writing E2E tests, please consider what the application is doing. If the application is still performing an action, tell the test to "wait" for the a...