Working With Android Tab Host Controls

Applies to TestComplete 15.49, last modified on March 17, 2023

Tab host (TabHost) controls are used to display a collection of tabs. A user can navigate the tabs by touching their labels. TestComplete provides extended support for Android tab host controls.

TestComplete analyzes the control class names and automatically creates wrapper Android TabHost test objects for tab host controls. These objects contain specific methods and properties for simulating user actions on tab hosts and for retrieving their data.

Supported tab host classes are listed in the project’s Object Mapping options. You can extend this list, for example, add the class name of a custom tab host control used in your tested application, and thus enable the recording and scripting support for this control. For more information, see Default Project Properties - Object Mapping Options.

Note: The described support is available only if the tested Android application is Open, that is, if it was prepared for TestComplete (see Preparing Android Applications (Legacy)).

The topics in this section provide detailed information about working with tab host controls in TestComplete and contain script samples that illustrate the explanation.

In This Section

Working With Tab Hosts - Basic Concepts

Contains information on working with the objects located in tabs.

Determining the Current Tab Page

Explains how to determine which tab page is focused.

Getting Tab Pages' Captions

Explains how to get a tab's text.

Determining the Number of Tab Pages

Contains information on how to determine the total number of tabs in the control.

Selecting Tab Pages

Explains how to simulate tab selection.

Related Topics of Interest

Working With Android Tab Host Controls

Describes how you can perform various operations over action bar controls using TestComplete.

Working With Android Radio Button Controls

Explains how to simulate actions over radio button controls with TestComplete.

Simulating User Actions

Explains the most common approaches for simulating user actions over an application's controls.

See Also

Android TabHost Support
Object-Specific Tasks
Supported Controls
Default Project Properties - Object Mapping Options

Highlight search results