Hi,
We are having multiple e-commerce apps and we want to make sure that the dynamic data like images, text etc. have completely loaded before we start the test. We can’t make it like to wait for particular item to load because we have numerous apps and we want to run this same thing on all the apps.
Create a method that waits for a particular item to be visible. We created an method that does a page dump then parses that information. We can pass it the type of object we want to wait for (resource-id, text, etc) as well as the value for that object. The method returns true or false. Then you can build a polling loop around that call.
Thanks @willosser for your reply.
I don’t know which element is in loading phase and I think checking particular element wouldn’t work in my case because I am not writing script each time, I am using this logic on bulk of my apps.
You can go to the next level and search for an array of values for an object type. We have to work with Android Native apps and there are multiple text strings for the same screen depending upon manufacturer and carrier. We changed our method to search for a group of items then return the item found or nil.
Perhaps I’ve misunderstood your description, but if you can’t predict what type of element and associated value should be present, I don’t understand how you hope to automate your tests.