I’m running into a strange issue when typing into multiple text fields. Typing in the first text field works fine but when I send_keys to the second field, it removes characters from the first text field before inserting text into the second one. Has anyone else experienced this?
example commands:
textfields[0].send_keys “ABCD”
textfields[1].send_keys “test”
I’ve also tried send_keys directly to the :id and :class objects for these fields too.
info: <-- POST /wd/hub/session/da8b37ba-c145-43a7-b29c-ee0c8d0e576f/element 200 11.808 ms - 88 {“status”:0,“value”:{“ELEMENT”:“29”},“sessionId”:“da8b37ba-c145-43a7-b29c-ee0c8d0e576f”}
info: --> POST /wd/hub/session/da8b37ba-c145-43a7-b29c-ee0c8d0e576f/element/29/value {“value”:[“test”]}
info: [debug] Pushing command to appium work queue: [“element:setText”,{“elementId”:“29”,“text”:“test”,“replace”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:setText”,“params”:{“elementId”:“29”,“text”:“test”,“replace”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: setText
info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
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] Text remains after clearing, but it appears to be hint text.
info: [debug] [BOOTSTRAP] [debug] Text not cleared. Assuming remainder is hint text.
info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: test
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:true,“status”:0}
info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“da8b37ba-c145-43a7-b29c-ee0c8d0e576f”}
I am still facing the same issue with the latest Appium 1.3.4 SW.
When i execute the script the it tries to send the text through sendkeys to edit field but before that uniobject.cleartext() cmd runs and it doesn’t types anything in the field . It clears off everything continuosly instead typing in the field. sendkeys not able to send any text. Please find the below log for reference.
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.TabHost[1]/android.widget.LinearLayout[2]/android.widget.FrameLayout[1]/android.widget.FrameLayout[1]/android.widget.ScrollView[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[3] using XPATH with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[CLASS=android.widget.LinearLayout, INSTANCE=10]
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:{“ELEMENT”:“31”},“status”:0}
info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“31”},“sessionId”:“a6da2ca2-ce6d-42e6-89ef-1a0cd37f89d9”}
info: <-- POST /wd/hub/session/a6da2ca2-ce6d-42e6-89ef-1a0cd37f89d9/element 200 640.244 ms - 88 {“status”:0,“value”:{“ELEMENT”:“31”},“sessionId”:“a6da2ca2-ce6d-42e6-89ef-1a0cd37f89d9”}
info: --> POST /wd/hub/session/a6da2ca2-ce6d-42e6-89ef-1a0cd37f89d9/element/31/clear {“id”:“31”}
info: [debug] Pushing command to appium work queue: [“element:clear”,{“elementId”:“31”}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:clear”,“params”:{“elementId”:“31”}} info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: clear
info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:true,“status”:0}
OSX 10.9.5
Appium 1.3.4
Real Device - Samsung S5 - So it is API 20 (=> Android)
I will say this- when upgrading with npm, you need to do it from a specific folder, to verify it really updates your appium,
instead of simply creating a new appium application that no one uses or refers to (talking out of experience:) )
Hello All,
I facing the same problem.It clicked on field but does not set the text.It’s very strange about this issue because it’s a very basic functionality which any tool support properly.
Configuration :
Appium Version - 1.3.4
Android Version - 4.4.2 (Using Samsung Note 2 and S4)
If any one know the alternate way of doing this, please let me know.