Selected Property (Specific to MSAA List Objects)

Applies to TestComplete 14.0, last modified on January 23, 2019

Description

Use the Selected property to check whether a particular list box item is selected or not.

Declaration

TestObj.Selected(Item)

Read-Only Property Boolean
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Item [in]    Required    Variant    

Applies To

The property is applied to the following object:

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Parameters

The property has the following parameter:

Item

Specifies the caption or zero-based index of the desired list box item.

The caption can contain asterisk (*) or question mark (?) wildcards or regular expressions. The asterisk corresponds to a string of any length (including an empty string), the question mark corresponds to any single character (including none). 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.

Property Value

True if the specified item is selected, False otherwise.

Remarks

If you use Python or DelphiScript, you should enclose the parameter of the Selected property in square brackets: Selected[Item].

To find out whether a list box item is selected, you can also use the Selected property of the corresponding ListItem object.

See Also

Selected Property (MSAA Objects)
ItemCount Property (Specific to MSAA ComboBox and MSAA List Objects)
Item Property (Specific to MSAA ComboBox and MSAA List Objects)
Focus Property (Specific to MSAA List Objects)
DoDefaultAction Method (MSAA Objects)
MSAA Object Types by Names

Highlight search results