-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Problem with clear() and type() on text input field (maxlength) #2056
Comments
Next input element with the same problem element type text. I have attached the html code and it's CSS. |
I can't type() on the field either as it already has max length filled in, {backspace} or {del} doesn't work so I am not able to edit the form. That's really important problem. Is there any workaround for this? |
@kapalkat I'm actively working on this right now. Should be in a patch release. This is closely related to other cy.type issues. |
@bkucera Thanks. Looking forward to the patch. In the meantime, I am using a workaround with jQuery; getting the maxlength attribute and increasing it before calling clear() or type() functions on the input element. |
@kapalkat Thanks! Workaround works for me. I hadn't even realized the maxlength was the issue. Looking forward to 3.0.3 |
I have got a similar issue with Cypress Version 4.11.0. Input Field looks like:
|
+1 for @kathrinkuenzli It's not working for me as well HTML Spec.js You can notice from the HTML example that I already have some text in the field, however, getting that element and clear it to type Actual behavior: "cypress": "5.4.0" |
This issue will be closed to further comment as the exact issue here was resolved and tested. If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix. |
Current behavior:
Cypress is not able to clear() and type() in text input field.
The problem is not constant, it appears in my tests only in few scenarios.
Desired behavior:
The clear() and type() actions should always work for input text type field.
Steps to reproduce:
My test looks like follow:
I am updating existing element. The update form input text type field:
My test first needs to clear existing value and add new one:
Console doesn't show any problem with both functions.
Versions
Cypress 3.0.1, macOS 10.13.5, Chrome
The text was updated successfully, but these errors were encountered: