What is the expected behavior of the Testcafe in those two cases:
Should Testcafe throw an error or just skip actions? Currently, in those cases, Testcafe just skips those steps and move forward.
I know that I can use something like
await t.expect(input.hasAttribute('readonly').notOk().typeText(input,'text');
It would be very helpful if Testcafe automatically does this verification.
Skipping actions with disabled/readonly elements is the expected behavior.
I agree that in some scenarios it makes sense to verify that the target element is enabled and writable. However, actions with disabled/readonly elements are not technically invalid, and they may be intended in certain test cases.
I have created an issue on GitHub for further discussion: https://github.com/DevExpress/testcafe/issues/4106.