Forum Discussion

kusterg's avatar
kusterg
Occasional Contributor
14 years ago

Expanding Tree control

I am working with an application that uses Infragistics controls 6.1 for tree views.

All tries I did, according to help and forum suggestions, to expand all the whole tree in order to select a specific node were not suggessful so far.



The full name of the tree control is defined as:



Sys.Process("Application").WinFormsObject("UserManagementWizard").WinFormsObject("wizard").WinFormsObject("pageOrganizationSelection").WinFormsObject("ctrlTreeOrganisation").WinFormsObject("pnlMainView").WinFormsObject("ctrlTree")



To access children it looks like the following: Nodes.Item(0).Nodes.Item(1).Text.OleValue



Any try to add an .expand behind a certain node or item just lead to an error in code.



Does anybody have any suggestions?

2 Replies


  • Hi Gaby,





    TestComplete has special support for the WinTree control from Infragistics. The tool should record the expand actions automatically without any need to write the corresponding code manually. You can find information on this in the InfragisticsWinTree Object help topic.





    If TestComplete does not work with your control in the way described in this topic, most probably, you are working with a descendant of the supported control. In this case, you need to map it to the supported control using the Object Mapping feature as it is specified in the mentioned topic.





    Please let me know whether this information helps.
  • kusterg's avatar
    kusterg
    Occasional Contributor
    Hi David,



    thank you very much for your help. I had the object mapped correctly already but found out due to your post, that I forgot to check the "derived Classes" check box. Now it works fine.



    Gaby