wText Property (ComboBox Controls)

Applies to TestComplete 15.47, last modified on January 20, 2023
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 wText property returns the text of the currently selected item.

Declaration

TestObj.wText

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

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.

Property Value

A string holding the item’s text.

Remarks

For WPF Controls: If a control uses data binding for its items, the wText property may fail to get the specified item’s text and will return an empty string instead. To get the item’s text, you can use the control’s native properties.

Example

To view an example that demonstrates how to use the wText property, see Getting Combo Box Items in Desktop Windows Applications.

See Also

Getting Combo Box Items in Desktop Windows Applications
wItemCount Property (Combo Box Controls)
wItem Property (ComboBox Controls)

Highlight search results