[IOS] [Simulator] sendkeys wrong text on ios simulator 9.3

Hi appium,

I setup an automation test using java. I wanna update my username by clear text and then sendKey: “Maldives island”. This is my code:

“‘textElement.clear();
textElement.sendKeys( “Maldives island”);’”

textElement.clear() run clear all text but i do not know why still have a character “m” on text box.
textElement.sendKeys( “Maldives island”) run but the string “mmmimmnnln mimmsmms” was filled on text box.

Please help me in this case.

Thanks

use better setValue with iOS it is 100 times faster.

textElement.setValue("your_text")
1 Like

I don know why, but i do not see setValue when i use textElement
What do i need import more to use setValue ?>.<

((IOSElement) textElement).setValue("some_value")

oh, i used WebElement. I can use setValue, it run so great, thanks you so much!

But end of action, the textbox is: “mMaldives island”. Why have “m” in textbox ?
This is my code:

textElement.clear();
textElement.setValue( “Maldives island”);

Please help me

you need to investigate yourself. possible solutions:

  1. insert pause after clear and see if something left in input
  2. try to clear 2 times (no idea maybe helps)
  3. try to set value = “”

I investigated the reason, the hint text of keyboard change sended text. How can i turn off hint text or avoid this case?

you should be able to disable it in same way as on real phone in settings

yeah, fixed it. Thanks you so much for amazing supported!