Expanded Property (TreeViewItem Objects)

Applies to TestComplete 15.63, last modified on April 23, 2024
This property is not supported in web tests (including cross-platform web tests) that use XPath expressions and CSS selectors to locate web elements. This property can be only used in tests that locate web objects by using internal identification properties provided by TestComplete.

Description

Use the Expanded property to check whether the control's item is expanded. When the state is expanded, the child items are displayed below the parent item. When it is collapsed, the child items are not displayed. The list automatically toggles between the expanded and collapsed states when the user double-clicks the parent item or when the user clicks the button associated with the parent item.

Declaration

TestObj.Expanded

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

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 item is expanded, False if the item is collapsed.

Remarks

To expand an item use the Expand action, to collapse an item use the Collapse action.

Example

To view an example that demonstrates how to use the Expanded property, see Checking Tree View Items’ State.

See Also

Collapse Action (TreeViewItem Objects)
Expand Action (TreeViewItem Objects)

Highlight search results