Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Cypress error. cy.type() failed because it requires a valid typeable element

cy.type() failed because it requires a valid typeable element.

The element typed into was:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

A typeable element matches one of the following selectors:
a[href]
area[href]
input
select
textarea
button
iframe
[tabindex]
[contenteditable]

I was trying to locate a field to enter date and it shows an error like this. But i have automated the field like same before without any errors.

>Solution :

You should be able to find an <input> within the <div>.

Not sure exactly what selectors you used, but this would be an example:

cy.get('div.mat-form-field-infix')
  .find('input')
  .type('21-10-2022')
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading