Unable to locate element in Android device with xpath


I’m trying to automate sending of text message from GO SMS application.

Test configuration is: Android, Appium 1.3.5, real device or AVD, Python, CentOS 7

It seems to be that locating the send button from application does not work with following command from Robot Framework Appium library:

Click Element | xpath=//*[@bounds=’[432,752][480,800]’]

It seems to be difficult to locate this element, because there is no id or name present.

Any other possibility to locate that element with xpath? See below picture as example.

info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
**info: [debug] [BOOTSTRAP] [debug] Finding //*[@bounds='[432,752][480,800]'] usin                                    g XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing** Accessibili                                    ty cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding //*[@bounds='[432,752][480,800]'] usin                                    g XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":[],"status":0}
info: [debug] Condition unmet after 1523ms. Timing out.
info: [debug] Responding to client with success: {"status":0,"value":[],"session                                    Id":"31f9350c-2b09-4db5-a40f-7175deff84da"}


Can you try with this:





Please star AVD with Another API Level or Another Android Version and the try to Capture the same UI with UI Automator.

It will Work for Sure… :smile:


thanks for the suggestions.

I tried those xpath paths, no luck yet…I will try next to change API level and Android version. I think that might actually help, because few months ago that xpath=*bounds…worked fine with another application.

Third option is to create own application where element id’s will be present just like I want :wink:

Changing to Android 4.4.2 mobile and API19 solved the problem, with that UIAutomationViewer shows “resource id” for the Textra application Send button, which Android 4.2.2 and API17 did not show.