Why cy.click fails but Cypress.$(e).trigger('click') works? #29351
Unanswered
Benjamin-Re
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm using Cypress 13 and when I use cy.click I get the 'click failed because the element is detached from the DOM' error.
When I instead use Cypress.$(e).trigger('click') it works as expected.
cy.click({force:true}) actually triggers some unexpected navigation in the webapp.
Could someone explain what is the difference between click and trigger('click')?
Beta Was this translation helpful? Give feedback.
All reactions