Could not locate an element using "resource-id"

Tried options:

  1. Switch to WEBVIEW context - getting available context as NATIVE_APP
  2. My resource-id does not have package name appending to it but tried appending and getting element could not locate error

Any suggestions pls… It would be great if you could reply ASAP. Really appreciate your replay. Thanks!

Element in UIAutomator:

Appium Log:
2016-10-27 07:46:01:243 - info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
2016-10-27 07:46:01:244 - info: Appium REST http interface listener started on 0.0.0.0:4723
2016-10-27 07:46:01:248 - info: [debug] Non-default server args: {“log”:“D:\Share Path\Sakthi\WS\LCOMobile-frameworkproject\src\main\resources\androidLog.txt”}
2016-10-27 07:46:01:249 - info: Console LogLevel: debug
2016-10-27 07:46:01:249 - info: File LogLevel: debug
2016-10-27 07:46:01:412 - info: --> GET /wd/hub/status {}
2016-10-27 07:46:01:414 - info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.16”,“revision”:“ae6877eff263066b26328d457bd285c0cc62430d”}}}
2016-10-27 07:46:01:421 - info: <-- GET /wd/hub/status 200 9.640 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.16”,“revision”:“ae6877eff263066b26328d457bd285c0cc62430d”}}}
2016-10-27 07:46:12:260 - info: --> POST /wd/hub/session {“desiredCapabilities”:{“appPackage”:“com.lexi.android”,“appActivity”:“com.lexi.android.core.activity.HomeActivity”,“platformVersion”:"",“automationName”:“Appium”,“browserName”:"",“platformName”:“Android”,“deviceName”:“CVH7N16612001364”}}
2016-10-27 07:46:12:262 - info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.8.0_60)
2016-10-27 07:46:12:266 - info: [debug] Didn’t get app but did get Android package, will attempt to launch it on the device
2016-10-27 07:46:12:267 - info: [debug] Creating new appium session 9b57ba25-1b0d-4063-93c8-e31a81de9e74
2016-10-27 07:46:12:268 - info: Starting android appium
2016-10-27 07:46:12:269 - info: [debug] Getting Java version
2016-10-27 07:46:12:413 - info: Java version is: 1.8.0_60
2016-10-27 07:46:12:414 - info: [debug] Checking whether adb is present
2016-10-27 07:46:12:415 - info: [debug] Using adb from D:\AndroidSDK\platform-tools\adb.exe
2016-10-27 07:46:12:415 - warn: No app capability, can’t parse package/activity
2016-10-27 07:46:12:416 - info: [debug] Using fast reset? true
2016-10-27 07:46:12:416 - info: [debug] Preparing device for session
2016-10-27 07:46:12:416 - info: [debug] Not checking whether app is present since we are assuming it’s already on the device
2016-10-27 07:46:12:417 - info: Retrieving device
2016-10-27 07:46:12:417 - info: [debug] Trying to find a connected android device
2016-10-27 07:46:12:418 - info: [debug] Getting connected devices…
2016-10-27 07:46:12:419 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe devices
2016-10-27 07:46:16:536 - info: [debug] 1 device(s) connected
2016-10-27 07:46:16:536 - info: Found device CVH7N16612001364
2016-10-27 07:46:16:537 - info: [debug] Setting device id to CVH7N16612001364
2016-10-27 07:46:16:538 - info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
2016-10-27 07:46:16:540 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 wait-for-device
2016-10-27 07:46:16:593 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 shell “echo ‘ready’”
2016-10-27 07:46:16:664 - info: [debug] Starting logcat capture
2016-10-27 07:46:16:728 - info: [debug] Getting device API level
2016-10-27 07:46:16:729 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 shell “getprop ro.build.version.sdk”
2016-10-27 07:46:16:834 - info: [debug] Device is at API Level 23
2016-10-27 07:46:16:835 - info: Device API level is: 23
2016-10-27 07:46:16:835 - info: [debug] Extracting strings for language: default
2016-10-27 07:46:16:836 - info: [debug] Apk doesn’t exist locally
2016-10-27 07:46:16:836 - info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring
2016-10-27 07:46:16:836 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 shell “rm -rf /data/local/tmp/strings.json”
2016-10-27 07:46:16:903 - info: [debug] Not uninstalling app since server not started with --full-reset
2016-10-27 07:46:16:904 - info: [debug] Skipping install since we launched with a package instead of an app path
2016-10-27 07:46:16:904 - info: [debug] Forwarding system:4724 to device:4724
2016-10-27 07:46:16:904 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 forward tcp:4724 tcp:4724
2016-10-27 07:46:16:952 - info: [debug] Pushing appium bootstrap to device…
2016-10-27 07:46:16:953 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 push “C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
2016-10-27 07:46:17:021 - info: [debug] Pushing settings apk to device…
2016-10-27 07:46:17:022 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 install “C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
2016-10-27 07:46:19:868 - info: [debug] Pushing unlock helper app to device…
2016-10-27 07:46:19:869 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 install “C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
2016-10-27 07:46:22:501 - info: Starting App
2016-10-27 07:46:22:502 - info: [debug] Attempting to kill all ‘uiautomator’ processes
2016-10-27 07:46:22:503 - info: [debug] Getting all processes with ‘uiautomator’
2016-10-27 07:46:22:504 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 shell “ps ‘uiautomator’”
2016-10-27 07:46:22:658 - info: [debug] No matching processes found
2016-10-27 07:46:22:658 - info: [debug] Running bootstrap
2016-10-27 07:46:22:659 - info: [debug] spawning: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.lexi.android -e disableAndroidWatchers false
2016-10-27 07:46:23:214 - info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
2016-10-27 07:46:23:214 - info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
2016-10-27 07:46:23:215 - info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
2016-10-27 07:46:23:216 - info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
2016-10-27 07:46:23:219 - info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
2016-10-27 07:46:23:221 - info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
2016-10-27 07:46:23:221 - info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
2016-10-27 07:46:23:221 - info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
2016-10-27 07:46:23:231 - info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
2016-10-27 07:46:23:236 - info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
2016-10-27 07:46:23:236 - info: [debug] [BOOTSTRAP] [debug] Loading json…
2016-10-27 07:46:23:236 - info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
2016-10-27 07:46:23:244 - info: [debug] Waking up device if it’s not alive
2016-10-27 07:46:23:245 - info: [debug] Pushing command to appium work queue: [“wake”,{}]
2016-10-27 07:46:23:250 - info: [debug] [BOOTSTRAP] [debug] Client connected
2016-10-27 07:46:23:252 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“wake”,“params”:{}}
2016-10-27 07:46:23:255 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2016-10-27 07:46:23:255 - info: [debug] [BOOTSTRAP] [debug] Got command action: wake
2016-10-27 07:46:23:259 - info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
2016-10-27 07:46:23:260 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 shell “dumpsys window”
2016-10-27 07:46:23:369 - info: [debug] Screen already unlocked, continuing.
2016-10-27 07:46:23:370 - info: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
2016-10-27 07:46:23:374 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“getDataDir”,“params”:{}}
2016-10-27 07:46:23:374 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2016-10-27 07:46:23:374 - info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
2016-10-27 07:46:23:375 - info: [debug] dataDir set to: /data/local/tmp
2016-10-27 07:46:23:375 - info: [debug] Pushing command to appium work queue: [“compressedLayoutHierarchy”,{“compressLayout”:false}]
2016-10-27 07:46:23:376 - info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:"/data/local/tmp"}
2016-10-27 07:46:23:382 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“compressedLayoutHierarchy”,“params”:{“compressLayout”:false}}
2016-10-27 07:46:23:382 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2016-10-27 07:46:23:382 - info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
2016-10-27 07:46:23:383 - info: [debug] Getting device API level
2016-10-27 07:46:23:383 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 shell “getprop ro.build.version.sdk”
2016-10-27 07:46:23:393 - info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:false}
2016-10-27 07:46:23:469 - info: [debug] Device is at API Level 23
2016-10-27 07:46:23:470 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.lexi.android/com.lexi.android.core.activity.HomeActivity”
2016-10-27 07:46:24:506 - info: [debug] Waiting for pkg “com.lexi.android” and activity “com.lexi.android.core.activity.HomeActivity” to be focused
2016-10-27 07:46:24:507 - info: [debug] Getting focused package and activity
2016-10-27 07:46:24:508 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 shell “dumpsys window windows”
2016-10-27 07:46:24:617 - info: [debug] executing cmd: D:\AndroidSDK\platform-tools\adb.exe -s CVH7N16612001364 shell “getprop ro.build.version.release”
2016-10-27 07:46:24:728 - info: [debug] Device is at release version 6.0.1
2016-10-27 07:46:24:728 - info: [debug] Device launched! Ready for commands
2016-10-27 07:46:24:729 - info: [debug] Setting command timeout to the default of 60 secs
2016-10-27 07:46:24:730 - info: [debug] Appium session started with sessionId 9b57ba25-1b0d-4063-93c8-e31a81de9e74
2016-10-27 07:46:24:732 - info: <-- POST /wd/hub/session 303 12471.079 ms - 74
2016-10-27 07:46:24:752 - info: --> GET /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74 {}
2016-10-27 07:46:24:753 - info: [debug] Responding to client with success: {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:"",“platformVersion”:“6.0.1”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“com.lexi.android”,“appActivity”:“com.lexi.android.core.activity.HomeActivity”,“platformVersion”:"",“automationName”:“Appium”,“browserName”:"",“platformName”:“Android”,“deviceName”:“CVH7N16612001364”},“appPackage”:“com.lexi.android”,“appActivity”:“com.lexi.android.core.activity.HomeActivity”,“automationName”:“Appium”,“platformName”:“Android”,“deviceName”:“CVH7N16612001364”},“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:24:754 - info: <-- GET /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74 200 2.558 ms - 710 {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:"",“platformVersion”:“6.0.1”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“com.lexi.android”,“appActivity”:“com.lexi.android.core.activity.HomeActivity”,“platformVersion”:"",“automationName”:“Appium”,“browserName”:"",“platformName”:“Android”,“deviceName”:“CVH7N16612001364”},“appPackage”:“com.lexi.android”,“appActivity”:“com.lexi.android.core.activity.HomeActivity”,“automationName”:“Appium”,“platformName”:“Android”,“deviceName”:“CVH7N16612001364”},“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:24:792 - info: --> POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element {“using”:“xpath”,“value”:"//android.widget.TextView[@text=‘Calc’]"}
2016-10-27 07:46:24:793 - info: [debug] Waiting up to 0ms for condition
2016-10-27 07:46:24:794 - info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“xpath”,“selector”:"//android.widget.TextView[@text=‘Calc’]",“context”:"",“multiple”:false}]
2016-10-27 07:46:24:805 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//android.widget.TextView[@text=‘Calc’]",“context”:"",“multiple”:false}}
2016-10-27 07:46:24:805 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2016-10-27 07:46:24:805 - info: [debug] [BOOTSTRAP] [debug] Got command action: find
2016-10-27 07:46:24:805 - info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.TextView[@text=‘Calc’] using XPATH with the contextId: multiple: false
2016-10-27 07:46:24:908 - info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[CLASS=android.widget.TextView, INSTANCE=3]
2016-10-27 07:46:25:135 - info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“1”}}
2016-10-27 07:46:25:137 - info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:25:138 - info: <-- POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element 200 346.490 ms - 87 {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:25:147 - info: --> POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element/1/click {“id”:“1”}
2016-10-27 07:46:25:148 - info: [debug] Pushing command to appium work queue: [“element:click”,{“elementId”:“1”}]
2016-10-27 07:46:25:153 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:click”,“params”:{“elementId”:“1”}}
2016-10-27 07:46:25:156 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2016-10-27 07:46:25:156 - info: [debug] [BOOTSTRAP] [debug] Got command action: click
2016-10-27 07:46:25:529 - info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
2016-10-27 07:46:25:531 - info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:25:532 - info: <-- POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element/1/click 200 385.851 ms - 76 {“status”:0,“value”:true,“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:25:542 - info: --> POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element {“using”:“id”,“value”:“com.lexi.android:id/search_src_text”}
2016-10-27 07:46:25:543 - info: [debug] Waiting up to 0ms for condition
2016-10-27 07:46:25:544 - info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“id”,“selector”:“com.lexi.android:id/search_src_text”,“context”:"",“multiple”:false}]
2016-10-27 07:46:25:552 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“com.lexi.android:id/search_src_text”,“context”:"",“multiple”:false}}
2016-10-27 07:46:25:552 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2016-10-27 07:46:25:553 - info: [debug] [BOOTSTRAP] [debug] Got command action: find
2016-10-27 07:46:25:553 - info: [debug] [BOOTSTRAP] [debug] Finding com.lexi.android:id/search_src_text using ID with the contextId: multiple: false
2016-10-27 07:46:25:555 - info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.lexi.android:id/search_src_text]
2016-10-27 07:46:26:203 - info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“2”}}
2016-10-27 07:46:26:205 - info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“2”},“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:26:210 - info: <-- POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element 200 665.061 ms - 87 {“status”:0,“value”:{“ELEMENT”:“2”},“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:26:219 - info: --> POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element/2/value {“id”:“2”,“value”:[“Adult”]}
2016-10-27 07:46:26:220 - info: [debug] Pushing command to appium work queue: [“element:setText”,{“elementId”:“2”,“text”:“Adult”,“replace”:false}]
2016-10-27 07:46:26:226 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:setText”,“params”:{“elementId”:“2”,“text”:“Adult”,“replace”:false}}
2016-10-27 07:46:26:226 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2016-10-27 07:46:26:227 - info: [debug] [BOOTSTRAP] [debug] Got command action: setText
2016-10-27 07:46:26:227 - info: [debug] [BOOTSTRAP] [debug] Using element passed in.
2016-10-27 07:46:26:241 - info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
2016-10-27 07:46:28:643 - info: [debug] [BOOTSTRAP] [debug] Text remains after clearing, but it appears to be hint text.
2016-10-27 07:46:28:661 - info: [debug] [BOOTSTRAP] [debug] Text not cleared. Assuming remainder is hint text.
2016-10-27 07:46:28:662 - info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: Adult
2016-10-27 07:46:31:043 - info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
2016-10-27 07:46:31:044 - info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:31:045 - info: <-- POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element/2/value 200 4826.678 ms - 76 {“status”:0,“value”:true,“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:31:053 - info: --> POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element {“using”:“xpath”,“value”:"//android.widget.TextView[@text=‘Advanced Life Support: Adult’]"}
2016-10-27 07:46:31:054 - info: [debug] Waiting up to 0ms for condition
2016-10-27 07:46:31:054 - info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“xpath”,“selector”:"//android.widget.TextView[@text=‘Advanced Life Support: Adult’]",“context”:"",“multiple”:false}]
2016-10-27 07:46:31:061 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//android.widget.TextView[@text=‘Advanced Life Support: Adult’]",“context”:"",“multiple”:false}}
2016-10-27 07:46:31:061 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2016-10-27 07:46:31:061 - info: [debug] [BOOTSTRAP] [debug] Got command action: find
2016-10-27 07:46:31:061 - info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.TextView[@text=‘Advanced Life Support: Adult’] using XPATH with the contextId: multiple: false
2016-10-27 07:46:31:142 - info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[CLASS=android.widget.TextView, INSTANCE=2]
2016-10-27 07:46:31:667 - info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“3”}}
2016-10-27 07:46:31:669 - info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“3”},“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:31:670 - info: <-- POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element 200 617.011 ms - 87 {“status”:0,“value”:{“ELEMENT”:“3”},“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:31:680 - info: --> POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element/3/click {“id”:“3”}
2016-10-27 07:46:31:681 - info: [debug] Pushing command to appium work queue: [“element:click”,{“elementId”:“3”}]
2016-10-27 07:46:31:688 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:click”,“params”:{“elementId”:“3”}}
2016-10-27 07:46:31:688 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2016-10-27 07:46:31:688 - info: [debug] [BOOTSTRAP] [debug] Got command action: click
2016-10-27 07:46:31:827 - info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
2016-10-27 07:46:31:832 - info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:31:833 - info: <-- POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element/3/click 200 153.941 ms - 76 {“status”:0,“value”:true,“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:31:845 - info: --> POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element {“using”:“id”,“value”:“ageInYears”}
2016-10-27 07:46:31:846 - info: [debug] Waiting up to 0ms for condition
2016-10-27 07:46:31:846 - info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“id”,“selector”:“ageInYears”,“context”:"",“multiple”:false}]
2016-10-27 07:46:31:853 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“ageInYears”,“context”:"",“multiple”:false}}
2016-10-27 07:46:31:854 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2016-10-27 07:46:31:854 - info: [debug] [BOOTSTRAP] [debug] Got command action: find
2016-10-27 07:46:31:854 - info: [debug] [BOOTSTRAP] [debug] Finding ageInYears using ID with the contextId: multiple: false
2016-10-27 07:46:31:854 - info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.lexi.android:id/ageInYears]
2016-10-27 07:46:33:758 - info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=android:id/ageInYears]
2016-10-27 07:46:33:797 - info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=ageInYears, INSTANCE=0]
2016-10-27 07:46:33:840 - info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
2016-10-27 07:46:33:843 - info: [debug] [BOOTSTRAP] [debug] Finding ageInYears using ID with the contextId: multiple: false
2016-10-27 07:46:33:843 - info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.lexi.android:id/ageInYears]
2016-10-27 07:46:33:903 - info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=android:id/ageInYears]
2016-10-27 07:46:33:952 - info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=ageInYears, INSTANCE=0]
2016-10-27 07:46:34:154 - info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:7,“value”:“No element found”}
2016-10-27 07:46:34:156 - info: [debug] Condition unmet after 2310ms. Timing out.
2016-10-27 07:46:34:157 - 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”:“No element found”},“sessionId”:“9b57ba25-1b0d-4063-93c8-e31a81de9e74”}
2016-10-27 07:46:34:159 - info: <-- POST /wd/hub/session/9b57ba25-1b0d-4063-93c8-e31a81de9e74/element 500 2312.557 ms - 195

Either you can use xpath or any other locator if that too not working then you may get the coordinates of the element and create a conversion class which may covert your xpath to coordinates as per the device resolution.
Hope that would help.