Element not Found exception in aws device form but in local i can able to run my scripts

Element not Found exception in aws device form but in local i can able to run my scripts

i had been tested the android application. in that application after login success we have loader to sync the data. after the loader got completed we have the actual screens but we can't able to find the elements in device farm. in local my scripts are run successfully

i given implicit wait upto 180 sec and test but i can't able to find the element in aws device farm and the data sync taken time depends on the data size and the network speed.

i have given my code here

while (!FOUND_ELEMENT) {
try {
if (driver.findElementById(“com.decoders.aerobit:id/settingLayout”).isDisplayed()) {
driver.findElementById(“com.decoders.aerobit:id/settingLayout”).click();
FOUND_ELEMENT = true;
break;
}
} catch (NoSuchElementException e) {
System.out.println(“No such Element Exeception”);
}
}

need immediate help on this and advance thanks for any help

Hi as you say that you are able to find element on local, is this for specific device or for every device.[Please verify for different device version.]
second, can you please update your code by replacing isDisplayed with size like this.

driver.findElements(By.id(“com.decoders.aerobit:id/settingLayout”)).size()>0)
and check if this is working or not.

1 Like

Thanks for your reply, I checked with same device with different version it found the element in Motorola Nexus 6 (version 5.1 and 6) but it didn’t found the element in Motorola Nexus 6 version 7 if any work around on this means let you guide me

Cool, do you have that device available locally so that you can test it ?
Please try with that nexus device using appium inspector and check whether that element appearing in layout tree or not because some nexus device have issues.

i have that device locally in local i tested with that device only. i will try witht the appium inspector let u know. i am using uiautomater to get the element is that not enough

using appium you can check click or any interaction is responding or not[also logs can be helpful] that’s why try with appium inspector