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:
AngularUI Select, ComboBox (Flex Objects), Developer Express ASPxComboBox and 22 more objects, Developer Express ColorComboBox, Developer Express ComboBox, Developer Express ComboBox (VCL), Developer Express ImageComboBox, Ext JS Combo Box, Infragistics UltraComboBox, JavaFX ChoiceBox, JavaFX ComboBox, Oracle Forms Combo Box, Oracle Forms Pop List, Qt ComboBox, Silverlight ComboBox, Syncfusion ComboBox Controls, Syncfusion ComboDropDown, Telerik RadComboBox for ASP.NET AJAX, Telerik RadComboBox for WinForms, Telerik RadComboBox for WPF, Telerik RadDropDownList for WinForms, Telerik RadMultiColumnComboBox for WinForms, WebComboBox, Win32 ComboBox, WPF ComboBox « Collapse the list
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)