Cypress · Middle · Question 42 of 77
What causes "element is detached from the DOM" style failures?
- 1The app re-rendered and replaced the element after it was found
- 2The element was moved into a different iframe by Cypress
- 3The browser ran out of memory during the test
Show the answer
Correct answer: The app re-rendered and replaced the element after it was found
Explanation
Since Cypress 12, queries re-run automatically, which removes most of these. Actions on stale elements can still fail if chains are long.