sendKeys not handling input with spaces on Android

I am currently working to get a mobile web test working in sauce labs through the Android Driver. I’ve been pretty successful except for hitting one major road bump. When we try to populate an address form through sendKeys, the spaces in the address are removed in the input field. For example, “100 main st” becomes “100mainst” and the test fails every time. Is there a known defect with appium or selenium that would cause this or a known work-around?

I have tried a number of different approaches to populating the input field, such as:

sendKeys(“100 main st”)

or

sendKeys(“100”)
sendKeys(Keys.SPACE)
sendKeys(“main”)

or
clicking the field first and then sending the keys

and a few other different things.

My desired capabilities pretty much look like the following:

desiredCapabilities = DesiredCapabilities.android()
desiredCapabilities.setCapability(“appiumVersion”, “1.3.4”);
desiredCapabilities.setCapability(“deviceName”,“Android Emulator”);
desiredCapabilities.setCapability(“device-orientation”, “portrait”);
desiredCapabilities.setCapability(“browserName”, “Browser”);
desiredCapabilities.setCapability(“platformVersion”, “4.4”);
desiredCapabilities.setCapability(“platformName”,“Android”);

1 Like

This is a bug. Please open an issue on the GitHub repo so the devs resolve the problem.

Thanks! I have logged issue #4334 for this [https://github.com/appium/appium/issues/4334].