Reputation: 1469
I am automating a native android application using appium and java. I could find locators of each element. Please refer below screen shots for your reference. Its not working as expected and getting me time out exception i.e. failed to find element where you can see, I have given correct id. For time being, I am using touchaction with x,y co-ordinates which is not correct solution. please help me to solve it.
Code snippet:
For example :
Exception Screen shot:
Upvotes: 0
Views: 1151
Reputation: 168147
Try invoking driver.getPageSource()
method and double check that the desired element is present in the XML page representation.
Going forward you can set printPageSourceOnFindFailure
to true
so Appium would print the source code of the page to the STDOUT on element find failure like:
caps.setCapability("printPageSourceOnFindFailure", true);
More information:
Upvotes: 0