The attached zipfile includes a sample application that contains a sample WPF application with a list-box that contains three textblocks for each item. The sample script traverses the items in the list and each of the controls in each item.
We use a custom function to access the controls:
function DumpUIAChildren(objRule, rootObj)
{
Tester.Message("Name: "+objRule.objectName(rootObj)+" objectClass: "+objRule.objectClass(rootObj));
// Learn the child as 'SeSObject'. Now we can use standard methods (Do... Get... Set...)
var sesObj = SeSTryMatch(rootObj);
// .highlight() is undocumented but very useful
sesObj.highlight();
sesObj.DoMouseMove(10,10);
var ccount = objRule.childCount(rootObj);
Tester.Message("# of children: "+ccount);
for(var i=0;i<ccount;i++)
{
var childObj = objRule.childAt(rootObj, i);
DumpUIAChildren(objRule, childObj);
}
}
Once you have this function added to the Test.user.js file you can use it with your learned ListBox object:
var list = SeS('List');
DumpUIAChildren(list.rule, list.instance);
The full source code is in the attached zipfile.