TestComplete supports most standard Windows controls, including list boxes. It provides the Win32ListBox
program object to work with Win32 list boxes. In fact, this object is automatically associated not only with standard Win32 list boxes, but with all list box controls whose class names are specified in the Win32 Controls and Windows | List Box group of the project’s Object Mapping options.
If your tested application uses a custom list box control, you can associate it with the Win32ListBox
object by adding its class name to the Object Mapping list. For more information, see Default Project Properties - Object Mapping Options.
The Win32ListBox
object’s methods and properties let you perform various operations over list box controls. In addition, if the tested application is an Open Application, the internal methods and properties of the list control are also visible to TestComplete and accessible from tests as well. To learn which methods and properties of the list box control are available to your tests, explore the control in the Object Browser.
The topics of this section discuss common operations that can be performed over list box controls.
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
Selecting a Single List Box Item
Selecting Multiple List Box Items
Getting a Single List Box Item
Getting Several List Box Items
Determining the Number of List Box Items
Determining Current List Box Item
Checking Whether a List Box Item Is Selected
Determining List Box Item Bounds
Clicking Within a List Box Item
Retrieving List Box Items. Example
Related Topics of Interest
Working With Combo Box Controls
Working With List View Controls
See Also
Win32 ListBox Support
Object-Specific Tasks
Supported Controls
Default Project Properties - Object Mapping Options