I'm trying to use the Inspect block to grab content from the screen (output of a search) to parse. I need to get several different bits of data from each search results. The challenge I'm having is that the output of Inspect seem to be incomplete.
I'm dealing with content that has a bunch of android.widget.TextView elements nested inside an android.view.View element. None of these have IDs, and the entire structure could be repeated N times, depending on the query that is passed to the application. I can identify one of these textView elements by its text, and so I built an XPath expression to give me a Node-Set of the ancestors of my matching textView:
//ancestor::*[android.widge.TextView[@android:text='" ++ varVariable + "']]"
Result type is set to Node-Set.
This works, and I get back an array of these nodes. But the output array only contains 4 elements, even though there are way more on the screen than 4.
My goal here is to iterate through the these structures returned by the application to extract the relevant bits of information to then go and act on. Is there a bug or a built-in limit or am I doing something totally wrong?
Should I instead be trying to iterate and parse through this stuff by changing my XPath to extract only a single node and putting that inside a loop?
Thanks.