wTabCaption Property (Tab Controls)

Applies to TestComplete 15.40, last modified on July 05, 2022
This property is not supported in web tests (including cross-platform web tests) that use XPath expressions and CSS selectors to locate web elements. This property can be only used in tests that locate web objects by using internal identification properties provided by TestComplete.

Description

The wTabCaption property returns the caption of the tabbed page specified by the Index parameter.

Declaration

TestObj.wTabCaption(Index)

Read-Only Property String
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Index [in]    Required    Integer    

Applies To

The property is applied to the following objects:

View Mode

This property is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Parameters

The property has the following parameter:

Index

Specifies the index of the tab item, which caption you want to get. The index is zero-based. The total number of pages in the tab control is given by wTabCount.

Property Value

A string holding the caption of the specified tabbed page or an empty string, if the specified page is not found.

Remarks

If the specified tabbed page is not found, wTabCaption returns an empty string and posts an error message to the test log.

If you use Python or DelphiScript, you should enclose the parameter of the wTabCaption property in square brackets: wTabCaption[Index].

Example

To view an example that demonstrates how to use the wTabCaption property, see Getting Tab Pages' Captions in Desktop Windows Applications.

See Also

Determining the Number of Tab Pages in Desktop Windows Applications
ClickTab Action (Tab Controls)
wFocusedTab Property (Tab Controls)
wTabCount Property (Tab Controls)

Highlight search results