Applications use tree view (TreeView) controls to display a hierarchical list of items such as index entries, directories and files, and so on. Each tree view item can have a list of child items that are displayed below this item. A user can navigate through the tree view by selecting, expanding and collapsing items as well as modifying tree data by editing item labels, checking and unchecking items and rearranging them.
With TestComplete, you can record and play back various kinds of user actions over tree view controls. TestComplete provides a number of program objects that let you work with various types of tree views:
Win32TreeView
- Provides a scripting interface to Win32 tree views.JTree
- Provides a scripting interface to Java Swing tree views.WPFTreeView
- Provides scripting access to WPF (XAML) tree views.
TestComplete associates tree view controls in the tested application with one of mentioned scripting objects by analyzing the application type and the controls’ class names. Class names of supported “standard” tree views are listed in the project’s Object Mapping options. If your tested application uses a tree view control that is inherited from a standard tree view, you can add its class name to the Object Mapping list and thus make TestComplete handle it as the standard control (including the recording and scripting support). For more information, see Object Mapping.
The topics of this section provide detailed information about working with tree view controls in TestComplete and contain script samples that illustrate the explanation. The information in these topics applies to standard Win32 controls, however most are valid for Java Swing and WPF controls as well, since the TestComplete support for these controls is very similar.
Note: | Though the following topics deal with scripts, you can use the same approaches while testing an application from your keyword tests. For more information, see Keyword Tests Basic Operations. |
In This Section
Working With Tree View Controls - Basic Concepts in Desktop Windows Applications
Addressing Tree View Items in Desktop Windows Applications
Selecting Tree View Items in Desktop Windows Applications
Getting the Current Tree View Item in Desktop Windows Applications
Getting Selected Tree View Items in Desktop Windows Applications
Expanding and Collapsing Tree View Items in Desktop Windows Applications
Checking and Unchecking Tree View Items in Desktop Windows Applications
Checking Tree View Items' State in Desktop Windows Applications
Changing Tree View Items' Captions in Desktop Windows Applications
Getting Tree View Item's Images in Desktop Windows Applications
Working With Owner-Drawn Tree View Controls in Desktop Windows Applications
Working With Third-Party Tree View Controls in Desktop Windows Applications
Retrieving TreeView Items. Example in Desktop Windows Applications
Related Topics of Interest
Working With List View Controls in Desktop Windows Applications
See Also
Win32 TreeView Support
WPF TreeView Support
Java Swing Tree Support
Object-Specific Tasks
Supported Controls