State Property (Specific to Flash and Flex CheckBox Objects)

Applies to TestComplete 14.74, last modified on March 31, 2021
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 this property to get or set an object’s current state.

Declaration

TestObj.State

Read-Write Property Integer
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

This property is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Property Value

One of the following constants:

Constant Value Description
cbUnchecked 0 The control is unchecked.
cbChecked 1 The control is checked.
Note: Flash and Flex CheckBox objects do not support the indeterminate state. Thus, setting the value of the State property in such check boxes to the cbGrayed or 2 value does not toggle them to the indeterminate state. However, if you try to set the State property to cbGrayed or 2, the appropriate check box will become selected as if you specified the cbChecked or 1 value.

Remarks

To toggle the control’s state, use the ClickButton method.

See Also

ClickButton Action (CheckBox and ToggleButton Controls)

Highlight search results