|This method is available in legacy mobile tests that work with devices connected to the local computer. To learn how to simulate user actions in newer cloud-compatible mobile tests, see the Simulating user actions in tests section.|
SelectItem action to select the specified item in the control.
|TestObj||A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section|
|SelOption||[in]||Optional||Boolean||Default value: True|
The method is applied to the following object:
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 parameters:
Specifies the caption or zero-based index of the desired item. The caption could contain asterisk (*) or question mark (?) wildcards or regular expressions. The asterisk corresponds to a string of any length, the question mark corresponds to any single character. To specify more complicated parts of a caption, use regular expressions.
The caption can be case-sensitive or case-insensitive depending on the value of the Use case-sensitive parameters project setting.
If you enter -1, all items will be selected or deselected.
Specifies whether the item will be selected or deselected.
|True, or 1||The Item will be selected.|
|False, or 0||The Item will be deselected.|
If Item is -1, all the items will be selected or unselected. But if the control does not support multiselection,
SelectItem will fail and post an error message to the test log.
If the specified item was not found, an error message is posted to the test log.
To view an example that demonstrates how to use the
SelectItem action, see Selecting List View Items.