Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress errors on cy.type in an input type='phone' #1645

Closed
lobor opened this issue Apr 27, 2018 · 1 comment
Closed

Cypress errors on cy.type in an input type='phone' #1645

lobor opened this issue Apr 27, 2018 · 1 comment

Comments

@lobor
Copy link

lobor commented Apr 27, 2018

When writing the following code, an error displays saying cy.type can't be used on the specified input with type="phone"

###Example Code

cy.type('[type="phone"]').type('1234567')

###Error

CypressError: .type() can only be called on textarea or :text!

It needs to be whitelisted to allow typing into similar to types text, search, url, etc.

@jennifer-shehane
Copy link
Member

phone is not a valid input type in html, tel is valid. If you are able, update your html: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel

That being said, many users have asked us to loosen our validation logic, which is being tracked in this issue: #586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants