I have a small problem in React project, when I want to use .click() from Cypress sometimes I have an error failed because this element is detached from the dom. The simple solution is to add wait() before each test to let the site render fully but it isn't the best solution for me. Is there any way to do it without using wait()?
This is related to a known cypress issue that they promise to fix soon: https://github.com/cypress-io/cypress/issues/7306
Until that's solved you can either add .wait(), if it works for your scenario, or alternative try .click({force: true}). Either have downsides though.
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