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.|