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
A check box control can be in the checked, unchecked or grayed state. Use the wState
property to specify the current state of a check box control.
Declaration
TestObj.wState
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:
AngularUI Bootstrap Checkbox, AngularUI Bootstrap Toogle Button, Bootstrap Checkbox and 26 more objects, Bootstrap Toogle Button, Developer Express Checkbox, Developer Express CheckEdit, Ext JS Checkbox Field, Ext JS Toggle Button, Java Swing CheckBox, Java Swing ToggleButton, JavaFX CheckBox, JavaFX ToggleButton, jQuery Mobile Checkbox, jQuery Mobile Flipswitch, jQuery UI Checkbox, Microsoft CheckBox, Oracle Forms Checkbox, Qt CheckBox, SAP GUI Checkbox, Silverlight CheckBox, Silverlight ToggleButton, Syncfusion CheckBoxAdv, Telerik RadCheckBox for WinForms, Telerik RadToggleButton for Silverlight, Telerik RadToggleButton for WinForms, Win32 CheckBox, WPF CheckBox, WPF ToggleButton, YUI 2 Checkbox Button « Collapse the list
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
The wState
property can have one of the following values:
Constant | Value | Description |
---|---|---|
cbUnchecked |
0 or False |
The control is unchecked. |
cbChecked |
1 or True |
The control is checked. |
cbGrayed |
2 | The control is grayed. |
Remarks
Microsoft CheckBox: A check box control can be in the grayed state only if the check box allows three states (the check box’s “native” ThreeState
property is True). If ThreeState
is False, the check box can only be checked or unchecked.
Silverlight CheckBox, WPF CheckBox: A check box control can be in the grayed state only if the check box allows three states (the check box’s “native” IsThreeState
property is True). If IsThreeState
is False, the check box can only be checked or unchecked.
JavaFX CheckBox: A check box control can be in the grayed state only if the check box allows three states (based on the value of the check box’s native allowIndeterminate
field). If allowIndeterminate
is Null Object
, the check box can only be checked or unchecked.
Example
To view an example that demonstrates how to use the wState
property, see Determining a Check Box's State.
See Also
Determining a Check Box's State
Selecting and Clearing Check Boxes
ClickButton Action (CheckBox and ToggleButton Controls)