Editable field methods of webelement work not stable on Android

The involved methods include: send_keys(), clear(), set_text()

First, let’s talk about: clear() and set_text()

I select the input field element with find_element_by_android_uiautomator(‘text(“%s”)’ %text), find it by text info ‘Rtyy’. And then if i use element.clear() or element.set_text(‘xxxx’), an exception raised, NoSuchElementException. Actually, these two methods did something, they deleted the text ‘Rtyy’ at least. But after they finished delete action, they tried to find the input field element with the original text ‘Rtyy’ which was deleted, so they cannot find it, and raise the exception.

And the let’s talk about send_keys()

Look, it is an empty input field. The ‘Type message’ is nothing. If i use element.send_keys(‘hello’), guess what happened. ‘Type messagehello’ input.

Did anybody else find this issue?

There’s a couple github issues regarding these methods, and I think a lot has changed recently. Perhaps @bootstraponline could give us an update?

It’s completely broken right now, we’re intending to fix this in appium 1.2.3.

And when is that 1.2.3 release expected ? Because i’m experiencing a similar thing … The field is cleared , but right after that the test fails with the following:

info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:clear”,“params”:{“elementId”:“2”}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: clear
info: [debug] [BOOTSTRAP] [debug] Updating class “class com.android.uiautomator.core.UiDevice” to enable field “mUiAutomationBridge”
info: [debug] [BOOTSTRAP] [debug] Updating class “class com.android.uiautomator.core.UiAutomatorBridge” to enable field “mInteractionController”
info: [debug] [BOOTSTRAP] [debug] Updating class “class com.android.uiautomator.core.UiDevice” to enable field “mUiAutomationBridge”
info: [debug] [BOOTSTRAP] [debug] Updating class “class com.android.uiautomator.core.UiAutomatorBridge” to enable field “mInteractionController”
info: [debug] [BOOTSTRAP] [debug] Finding methods on class: class com.android.uiautomator.core.InteractionController
info: [debug] [BOOTSTRAP] [debug] Finding methods on class: class com.android.uiautomator.core.InteractionController
info: [debug] [BOOTSTRAP] [debug] Finding methods on class: class com.android.uiautomator.core.InteractionController
info: [debug] [BOOTSTRAP] [debug] Clearing text not successful using selectAllDelete now trying to send delete keys.
info: [debug] [BOOTSTRAP] [debug] Finding methods on class: class com.android.uiautomator.core.UiAutomatorBridge
info: [debug] [BOOTSTRAP] [debug] Clearing text not successful falling back to UiAutomator method clear
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“Clear text not successful.”,“status”:13}
info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command.”,“origValue”:“Clear text not successful.”},“sessionId”:"6221e6a9-aadb-4aa4-9169-0641f968f
info: <-- POST /wd/hub/session/6221e6a9-aadb-4aa4-9169-0641f968f340/element/2/clear 500 16125.832 ms - 195
info: [debug] Didn’t get a new command in 60 secs, shutting down…