As noted initially from this comment https://github.com/cypress-io/cypress/pull/4783#issuecomment-516174805, Cypress now errors since 3.4.1 release when attempting to click on a readonly
input or textarea.
Unlike an input being disabled
, having a readonly
attribute does not restrict clicking, focusing, selecting, or triggering events on the element. These actions should be allowed and only typing should be restricted.
cy.get('input[readonly]`).click()
Cypress 3.4.1
I updated to latest Cypress version and facing this issue of 'readonly' inputs while clicking the Calendar to select a date. When will this be resolved?
@prashantabellad We have a working PR in, so just needs review. https://github.com/cypress-io/cypress/pull/4881
Hey, any update on when this change will be merged in? :-)
Still an issue...
@Alendorff You're correct. The issue will be closed and commented on as released when this is fixed.
The code for this is done in cypress-io/cypress#4881, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
Put the input inside a div and click on the div. It worked for me.
Released in 3.5.0
.
Same happens in 3.5.0 :(
But only in gitlab ci, image: cypress/base:12.13.0, not on local machine :(
Turns out it was covered by another element https://docs.cypress.io/guides/core-concepts/interacting-with-elements.html#Actionability
Most helpful comment
Hey, any update on when this change will be merged in? :-)