Agreed. I am doing the same. However, I would love to know why it inputs the wrong text? Is it device dependent? Or is it UIAutomator’s fault? Or is it an issue with the way OS is designed/call to input text is being made.
Can we fix it at the grass root level?
…and most importantly, has anyone else encountered this as well?
Any of these are possible, but based on gut feeling, I believe it’s likely device dependent and the way the device’s OS is built (which, in the Android world, usually refer to the device as a whole since OS and hardware are closely tied together). Does sendKeys send the wrong text on all the devices you have tried? I might recommend enabling Appium’s Unicode keyboard. There’s a “unicodeKeyboard” capability you can use when setting up your desired capabilities object: http://appium.io/slate/en/master/?ruby#android-only
I’m not sure if this is the same problem, but some of my scripts clear out a search box before entering new criteria, and sometimes instead of clearing out the text, it selects some or all of the text, then backspaces a few times, then enters the new criteria, resulting in the wrong data being sent since not all of the original text was cleared out. I see this on my Galaxy S6 about 30% of the time.
I have seen it on multiple devices. And it does happen 2/5 times. It usually happens on Motorola device, which boast stock android OS. I will give a shot to ‘unicodeKeyboard’. Lets see if that helps. Thanks!