You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to test a "Character validation" feature for a text input. The requirement is that no more than 1000 characters are allowed in the text box, when it is at the upper limit of 1000, the User should not be able to input anymore character into the field.
I am randomly generating a string of 1000 characters, asserting that my "0 characters remaining" message is shown, and then I want to assert that no more characters can be added to the input. To do this, I want to ADD 1 more character to the end of text that is in the input field, then assert that it is not there (User typed the character, but it has not been allowed into the input). My random string is letters only, so I am adding a "1" and then asserting that the "1" is not there.
My issue is that whenever I try and input something. The field get's completely cleared. Is there anyway to ADD this extra character to what is already in the input field, without having to input all 1000 characters again + the "1" character?
The text was updated successfully, but these errors were encountered:
Yes, I'm correct, using sendKeys() still clears the value that was previously entered into the text field. I've tried Enter() and SendKeys(). Found Press() on the Javascript documentation, but I don't believe that is available within the Java libraries.
This is my code:
Initially filling the text field:
I am trying to test a "Character validation" feature for a text input. The requirement is that no more than 1000 characters are allowed in the text box, when it is at the upper limit of 1000, the User should not be able to input anymore character into the field.
I am randomly generating a string of 1000 characters, asserting that my "0 characters remaining" message is shown, and then I want to assert that no more characters can be added to the input. To do this, I want to ADD 1 more character to the end of text that is in the input field, then assert that it is not there (User typed the character, but it has not been allowed into the input). My random string is letters only, so I am adding a "1" and then asserting that the "1" is not there.
My issue is that whenever I try and input something. The field get's completely cleared. Is there anyway to ADD this extra character to what is already in the input field, without having to input all 1000 characters again + the "1" character?
The text was updated successfully, but these errors were encountered: