Selected Property (MSAA Objects)

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

Use the Selected property to get or set the object’s selected state.

Declaration

TestObj.Selected

Read-Write Property Boolean
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:

View Mode

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

Property Value

True if the specified object is selected, False otherwise.

Remarks

The Selected property may be absent in some objects listed in the Applies To section and may be present in other objects. This depends on the implementation of the IAccessible.State property on a particular object.

Do not confuse the selected and focused states:

  • The focused object is the currently active object, which has the input focus. To check if an object is focused, use the Focused property.

  • A selected object is the one that is marked (for example, one of items selected in a list box). At that, a selected object may or may not be focused.

See Also

Focused Property (MSAA Objects)
DoDefaultAction Method (MSAA Objects)
Selected Property (Specific to MSAA List Objects)

Highlight search results