Cy.click failed because the targetted element is disabled
See original GitHub issuecy.click failed with the reason - “The targetted element is disabled”. But the targetted element is enabled here. The outerhtml of the targetted element is as below.
sometimes cy.click failed with the reason that targetted element is not fully visible. I.e if the button or anchor ag text is partially visible at that click fails
<a class="btn" data-click="myClickEvent" data-bind="enable: enabled, css: { 'disabled': !enabled() }, attr:{'test-id':text}" test-id="elementDataTestID">...</a>
I debug and found that “ensureNotDisabled” is getting callled and After evaluating subject.prop(‘disabled’) it returns true which throws that error. Is any work around for this Except force:true. IT works but doesn’t wish to use…
Versions
Cypress Version : 5.1. OS:- Windows 10 Browser:- Electron and Chrome
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
Cy.click failed because the targetted element is disabled or its ...
I debug and found that "ensureNotDisabled" is getting callled and After evaluating subject. prop('disabled') it returns true which throws that ...
Read more >cy.type() failed because it targeted a disabled element
Cypress is failing a test because it claims that an element is disabled. However, there is nothing to indicate that this element is...
Read more >Cy.Click Failed Because The Targetted Element Is Disabled ...
This disabled error happens consistently when the cypress test tries to enter information into an input field after directly unfocusing from an. I'm ......
Read more >cypress-io/cypress - Gitter
Struggling with disabled element: I get this error: CypressError: cy.type() failed because it targeted a disabled element. The element typed into was: >...
Read more >Actions | Cypress examples (v7.1.0) - Gleb Bahmutov
Click on canvas · Click on multiple elements · Click on disabled element · Click waits for visible element · Get checked option....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing because of inactivity. If the problem is still happening, please open a new issue with a reproducible example.
I get the same error when trying to use .select() instead of .click(), in every way that I can verify the <select> tag, it is not disabled. It looks like a bug, but I’m not sure how to reproduce outside of the larger project I’m working with.