hrothrock
5 years agoContributor
lazy loading - objects not yet in memory
I am working with an application that uses lazy loading. In one of my tests, I am accessing a row that is visible on a normal monitor. Today I am working on my small laptop and the row is not only no...
- 5 years ago
FindChild by itself still won't overcome the lazy-load... that's why my PseudoCode had the PageDown call in a while loop. I'd re-write your code as follows.
function findRow() { var Row = 8; var List = Aliases.pageDispatch.ListDispatchJobs; var child = List.FindChild("Name", "Panel(" + (Row -1) + ")", 1, true); while (!child.Exists) { List.Keys("[PageDown]"); child = List.FindChild("Name", "Panel(" + (Row -1) + ")", 1, true); } Log.Message(child.contentText); }
This will check to see if the child exists. If not, it sends a page down keystroke to scroll the list and then checks again. When it does exist, it exits the while loop and the child object is now the desired object.