I’m using Appium and Java in an Android emulator, and the sendKeys erases the text in the element and then sets the new text.
Is there a way to keep the old text and just append a new one after that?
Example:
//Element text is “abc” element.sendKeys("123");
Expected result = “abc123”
Actual result = “123”
Note: This is necessary due to a test case in which the input field should display a warning when it has the character limit and user tries to type a new character in the end.
Yes, the field limit is 100 characters, and if the user inputs the 101st, a warning should be displayed.
That’s actually the point of the test. The requirement is that the field has 100 characters, and when the 101st is typed, the warning should be displayed
I’m sorry that I’m not understanding this, could you explain it better? Specifically why you would need existing text when you could just send 101 chars…