Description
Use the wSelectedItems
property to get the captions of currently selected items as one string separated by the value of the wListSeparator
property.
Declaration
TestObj.wSelectedItems
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:
Flex List, Java Swing List, jQuery Mobile Selectmultiplemenu and 6 more objects, Web List Box, Win32 ListBox, Win32 ListView, WPF ListBox, WPF ListView, XUL Listbox « Collapse the list
View Mode
To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.
Property Value
A string containing the captions of currently selected items.
Remarks
If the list box control does not have the LBS_HASSTRINGS style, the wSelectedItems property will return an empty string and TestComplete will post an error message to the test log. |
If a control uses data binding for its items, the wSelectedItems property may fail to get the captions of the selected items and will return empty strings instead. To get the captions of the selected items, you can use the control’s native properties. |
Example
To view an example that demonstrates how to use the wSelectedItems
property, see Getting the Selected List View Item(s) in Desktop Windows Applications.
See Also
Getting Several List Box Items in Desktop Windows Applications