Forum Discussion

googleid_114358's avatar
googleid_114358
Contributor
12 years ago

Support for WPF TreeView ItemTemplate

Hi.



Our dev team uses TreeView ItemTemplate to define custom TreeViewItem with HierarchicalDataTemplate that contains several TextBlock or Picture.

TestComplete object browser detects all those custom item templates. But unfortunately, when we use the Recorded, here is what we see : 



WPFObject("_treeView").ClickItem("|[1]|[0]")



or even wose : 

WPFObject("letreeview").WPFObject("TreeViewItem", "", 5).WPFObject("TreeViewItem", "", 1).WPFObject("TreeViewItem", "", 1).WPFObject("EditableTextBlock", "TEST", 1).Click(6, 7);





I would like to be able to use the same mechanism as with WinFormObject - WinFormObjec("TreeView").Clickitem("|Root|Node|Leaf");

I don't really know if there is something in TestComplete that would let me do so, or if our dev team should uses another kind of templates.



Do you have any idea ?



Regards, 



Guillaume Théraud.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Guillaume,


     


    I understand your concern. However, at the moment, recording only by indexes is supported for such controls.


    Our R&D team will think what they can do in future TestComplete versions.