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
.type()
does not type chars in number input beyond special chars (like ,
)
#5997
Comments
What is the type of your input? We've also noticed some difference in recent versions and tracked it down to these regexp:
To be honest I don't think that automation framework should do this at all. |
This is only for number inputs, and Cypress has to do this because they replicate certain browser / html functionality, unlike Selenium. |
I'm using them as string obj. Should I prefer to use them as a number type or it doesn't matter? |
@abaybabaydabudidabuday Can you paste in the html of the input element? We want to know the <input type="???" /> |
I verified this behavior in 3.8.0. When typing manually, I can type
<!DOCTYPE html>
<html>
<body>
<input type="number"/>
</body>
</html> it('Type in number', () => {
cy.visit('index.html')
cy.get('input').type('1,000')
}) 3.7.0Events table when clicking on 'type' command 3.8.0You can see the test run where it only has Events table when clicking on 'type' command. Seems like the WorkaroundRoll back to 3.7.0 in the meantime. |
.type()
does not type chars in number input beyond special chars (like ,
)
The code for this is done in cypress-io/cypress#6033, but has yet to be released. |
Released in |
Current behavior:
Pre-conditions - in my text form "," sign not allowed to input
Input inside type() func:
1,99
Output:
1
Desired behavior:
199
It worked in previous version of cypress correctly and problem I met in 3.8.0
Steps to reproduce: (app code and test code)
Just try to type from tests some signs that couldn't be written.
Versions
Cypress 3.8.0
OS: Mac Mojave
Browser: Chrome
The text was updated successfully, but these errors were encountered: