Hi, I am using AndroidDriver findElementByAndroidUIAutomator() to find element in my app page. I wonder how I could check the existence of an element.
I was trying to achieve that by the following code:
AndroidElement element = androiddriver.findElementByAndroidUIAutomator("finding string");
if (element.isDisplayed()) {
// find element
} else {
// not find
}
But the else condition was never reached when the actual element did not exist. The appium log is
Returning result: {"value", "No element found", "status' : 7}
How can I get the message or exception of the element existence status like webelement? Thx in adavance.