Zepher
Zepher

Reputation: 21

testcafe - unable to click disabled input

The site I'm writing automation tests for has disabled input fields that become enabled when a user clicks on them. I've spent a good day or so attempting to make testcafe click on an element within the form that will enable the fields for the edit but with no luck.

Looks like it may have been intentionally blocked so that disabled fields will not react to events?

https://github.com/DevExpress/testcafe-hammerhead/pull/1505

does anyone know a way around this? is there any way to allow disabled inputs to accept click events?

Upvotes: 2

Views: 547

Answers (1)

Arseniy Rubtsov
Arseniy Rubtsov

Reputation: 880

Disabled input will not receive the click event. So for now, TestCafe skips an action if the corresponding element is disabled. As a workaround, you can interact with another element (on which you handle click event) or use ClientFunction to raise the desired input's event directly on the page. If none of these approaches will meet your needs, then please provide a small example for a better understanding of your scenario.

Upvotes: 1

Related Questions