| || |
tree view control
I am testing .net application. Test Complete 8 records the tree view control as follows:
treeView := ClntMain.WPFObject('HwndSource: AdornerDecorator', 'elementHost1').WPFObject('AdornerDecorator', '', 1).WPFObject('AvalonAdapter', '', 1).WPFObject('MyCtrlTreeView', '', 1).WPFObject('DockPanel', '', 1).WPFObject('treeView1');
I also try to use selectItem function to specify the selected treeview items.
But it does not work.
1. How can I record the selected treeview items with the item name rather than the item number?
Re: tree view control
It looks like your control is owner-drawn. In this case, you can record item-based actions only by indexes (see the "Testing Owner-Drawn Controls" and "Working With Owner-Drawn Tree View Controls" help topics).
However, you should be able to access item captions via native properties and methods of your tree view (in the way you'd access them in your application). Iterate through them in a loop and get indexes of the ones which have captions you need to click. Once you do this you can then pass indexes to ClickItem and similar methods.