.sendKeys not working in 1.2.2

1,667 views
Skip to first unread message

David Turner

unread,
Sep 2, 2014, 2:30:29 PM9/2/14
to appium-...@googlegroups.com
I can no longer send text to my text field. I When I reinstalled 1.2.0 the code worked again.

System: Mac
Target:Android device: nexus 4: 4.4.4
Code:Java

---code----
WebElement textField = (get WebElement method);
textField.click();

textField.sendKeys(text);

The click works correctly, but no text is entered. 

TagName android.widget.EditText
content-desc: Search…
Text: Search…
Location: (10, 60)
Size: (676, 80)

Visible: true

Joel Miele

unread,
Sep 3, 2014, 5:57:42 PM9/3/14
to appium-...@googlegroups.com
I'm also noticing an issue on 1.2.2 that I don't encounter on 1.2.0.  For me, the text field is prepended with the text field hint.  E.g. for a login activity, the TextView for email address has a hint: "Email" that is cleared soon as you start typing.  Based on the appium log it looks like it's trying to clear the field first, failing, then reading the field and prepending that to that actual test I've sent.

Log dump of this taking place:
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"8","text":"te...@gmail.com","replace":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: setText
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] clearText not successful, continuing with setText anyway
info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: Emai...@gmail.com

Joel Miele

unread,
Sep 3, 2014, 6:01:17 PM9/3/14
to appium-...@googlegroups.com
I found this issue on the Github page.


On Wednesday, September 3, 2014 5:57:42 PM UTC-4, Joel Miele wrote:
I'm also noticing an issue on 1.2.2 that I don't encounter on 1.2.0.  For me, the text field is prepended with the text field hint.  E.g. for a login activity, the TextView for email address has a hint: "Email" that is cleared soon as you start typing.  Based on the appium log it looks like it's trying to clear the field first, failing, then reading the field and prepending that to that actual test I've sent.

Log dump of this taking place:
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"8","text":"test@gmail.com","replace":false}}
Reply all
Reply to author
Forward
0 new messages