|This method is not supported in web tests (including cross-platform web tests) that use XPath expressions and CSS selectors to locate web elements. This method can be only used in tests that locate web objects by using internal identification properties provided by TestComplete.|
MultiSelect action to select several items in the specified list box control.
|TestObj||A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section|
The method is applied to the following objects:
Developer Express ASPxListBox, Developer Express CheckedListBox, Developer Express CheckListBox and 15 more objects, Developer Express ListBox, Ext JS Time Picker, Flash List, Flash TileList, Flex List, Java Swing List, Oracle Forms List, Qt ListWidget, Silverlight ListBox, Telerik RadListBox for WinForms, Telerik RadListControl for WinForms, Web List Box, Win32 ListBox, WPF ListBox, XUL Listbox « Collapse the list
To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.
The method has the following parameter:
This parameter can be either of the following:
- A string holding the captions of items to select, separated by the
wListSeparatorcharacters. The default list separator is the pipe character.
Item captions can contain wildcard characters - * and ?. The asterisk (*) corresponds to a string of any length, the question mark (?) - to any single character. Captions can be case-sensitive or case-insensitive depending on the value of the Use case-sensitive parameters project setting.
In order for this action to execute successfully, the control must support multiselection. If an item is not found or the control does not support multiselection,
MultiSelect fails and posts an error message to the test log.
Java Swing List: When you call the
MultiSelectmethod, the previous selection is preserved. To deselect an item you should call
SelectItemwith the SelOption parameter set to False. To deselect all list box items, call
Win32 ListBox: The list box must have the
Itemsis a string containing the item names to be selected.
If the list box style does not include
MultiSelectfails and posts an error message to the test log.
Chrome browser: TestComplete may fail to record the
MultiSelectmethod for web controls in Chrome. It will record ordinary coordinate clicks instead. You can replace those clicks with the
MultiSelectmethod in your tests manually.
To view an example that demonstrates how to use the
MultiSelect action, see Selecting Multiple List Box Items in Desktop Windows Applications.