can any one please help me how to select the items which have autocomplete selection on android.I am not able to see the elements through uiautomatorviewer.I can do the same thing by identifying the element coordinates but the element coordinates are varying from device to device.
Here I attached the sample screenshot which I am trying to solve the problem
AutoComplete is handled by native android library, why are you validating android library. Do not consider such requirement in functional testing. If you are really interested to test such requirement then this needs to be covered at Android UI Unit/Integration test using espresso framework. It does not add any value if you cover this in Functional e2e tests.
I am getting “An element could not be located on the page using the given search parameters”
This is the code i used: driver.find_element_by_xpath(“//*[@text=‘Autooo User1’]”).click()
Here is the Appium Node log:
info: ← POST /wd/hub/session/f5700f2f-5211-413e-af1b-3ac6b22f3478/element/5/value 200 6852.726 ms - 76 {“status”:0,“value”:true,“sessionId”:“f5700f2f-5211-413e-af1b-3ac6b22f3478”}
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
info: → POST /wd/hub/session/f5700f2f-5211-413e-af1b-3ac6b22f3478/element {“using”:“xpath”,“sessionId”:“f5700f2f-5211-413e-af1b-3ac6b22f3478”,“value”:“//[@text=‘Autooo User1’]“}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“xpath”,“selector”:”//[@text=‘Autooo User1’]”,“context”:“”,“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//[@text=‘Autooo User1’]“,“context”:”",“multiple”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //[@text=‘Autooo User1’] using XPATH with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:7,“value”:"Could not find an element using supplied strategy. "}
info: [debug] Condition unmet after 179ms. Timing out.
info: [debug] Responding to client with error: {“status”:7,“value”:{“message”:“An element could not be located on the page using the given search parameters.”,“origValue”:"Could not find an element using supplied strategy. "},“sessionId”:“f5700f2f-5211-413e-af1b-3ac6b22f3478”}
info: ← POST /wd/hub/session/f5700f2f-5211-413e-af1b-3ac6b22f3478/element 500 182.361 ms - 230