Visible elements are not detected in appium

I have a simple page with a proper resource id. When trying to search for this element, appium script is failing with reason No Such element found.

MobileElement el = (MobileElement) driver.findElement(""));

I tried adding implicit wait for 30seconds, and explicit waits, and Thread.sleep();

Nothing seems to work. Also, there is an inconsistency while searching for this element. Sometimes the element is being searched and most cases it is failing.

Note: the page is loaded properly for all the elements to be visible

  1. can you see your element in pageSource ?
  2. can you see your element in “UI Automator Viewer” (see “tools” folder of android sdk) ?
  1. Yes the element can be seen from pageSource.
    This is the element found ater printing pageSource.

    <android.widget.TextView index="3" package="" class="android.widget.TextView" text="[email protected]" resource-id="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,622][1080,681]" displayed="true" />

try to change id to AccessibilityId


MobileElement el = (MobileElement) driver.findElement("tvEmail"));
MobileElement el = (MobileElement) driver.findElement(MobileBy.AndroidUIAutomator("new UiSelector().resourceIdMatches(\".*tvEmail\")"));


I have tried both the ways but it is not helping me much. Sometimes there is a success in searching the element, while most of the times it is failing

Good information thanks for sharing