Working With Tab Controls in Desktop Windows Applications

Applies to TestComplete 15.69, last modified on November 13, 2024

Applications use tab controls to define several pages for the same area of a window. Each tab page can contain a set of controls, which is displayed when the user selects this page.

TestComplete lets you perform various operations over tab controls and work with their data from tests. It uses Win32TabControl to work with tab controls whose class names are listed in the Default Project Properties - Object Mapping Options options of the current project. If you need to test a custom tab control, you can associate its window class name with the scripting object by adding it to the Default Project Properties - Object Mapping Options list.

Using specific properties and methods of the Win32TabControl object performs various actions over the tested tab control. Furthermore, if the application you are testing is an Open one, you can access the internal properties and methods of the tab control and work with them from your tests. You can explore your tab control in the Object Browser to learn which internal properties and methods are available to your tests.

The topics of this section provide detailed information on working with Win32 tab controls in TestComplete. To learn about working with Android tab host controls see the Working With Android Tab Host Controls section.

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 Tab Pages in Desktop Windows Applications

Explains how to select the needed tab page.

Determining the Current Tab Page in Desktop Windows Applications

Describes how to determine the currently focused tab.

Determining the Number of Tab Pages in Desktop Windows Applications

Explains how to determine the total number of tabs in a tab control.

Getting Tab Pages' Captions in Desktop Windows Applications

Contains information on how to obtain tab pages’ captions.

Getting Tab Pages' Images in Desktop Windows Applications

Describes how to obtain images associated with tabs.

Determining the Number of Tab Rows in Desktop Windows Applications

Describes how to find the number of rows that the tabs are grouped into.

Related Topics of Interest

Simulating User Actions

Explains the approaches used for simulating user actions over applications’ controls.

See Also

Win32 TabControl Support
Object-Specific Tasks
Supported Controls
Default Project Properties - Object Mapping Options
About Open Applications

Highlight search results