Note: To learn how to simulate user actions over list box controls in web applications, see Working With List Box Controls in Web Applications.
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 in Desktop Windows Applications
Selecting Multiple List Box Items in Desktop Windows Applications
Getting a Single List Box Item in Desktop Windows Applications
Getting Several List Box Items in Desktop Windows Applications
Determining the Number of List Box Items in Desktop Windows Applications
Determining Current List Box Item in Desktop Windows Applications
Checking Whether a List Box Item Is Selected in Desktop Windows Applications
Determining List Box Item Bounds in Desktop Windows Applications
Clicking Within a List Box Item in Desktop Windows Applications
Retrieving List Box Items in Desktop Windows Applications. Example
Related Topics of Interest
Working With Combo Box Controls in Desktop Windows Applications
Working With List View Controls in Desktop Windows Applications
See Also
Win32 ListBox Support
Object-Specific Tasks
Working With List Box Controls in Web Applications
Supported Controls
Default Project Properties - Object Mapping Options