Information in this topic applies only to web tests that implement the default approach. This method is not supported in cross-platform web tests. |
Description
The ClickButton
action moves the mouse pointer to a check box, and then sets its state according to the State parameter.
Declaration
TestObj.ClickButton(State)
TestObj | A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section | |||
State | [in] | Required | Variant | |
Result | None |
Applies To
The method 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, Flash CheckBox, Flex CheckBox, Java Swing CheckBox, Java Swing ToggleButton, JavaFX CheckBox, JavaFX ToggleButton, jQuery Mobile Checkbox, jQuery Mobile Flipswitch, jQuery UI Checkbox, Oracle Forms Checkbox, Qt 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 method is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.
Parameters
The method has the following parameter:
State
Specifies the state of the control.
Possible values:
Value | Description |
---|---|
cbChecked , True or 1 |
The control is checked. |
cbUnchecked , False or 0 |
The control is unchecked. |
cbGrayed or 2 |
The control is grayed.
The following controls do not support this value:
|
If the control does not support the indeterminate state, ClickButton(2) fails and posts an error message to the test log. |
Result Value
None.
Remarks
If the State parameter corresponds to the control's state (for example, State is cbChecked
and the control is already checked), ClickButton
performs no action and reports in the test log that the operation was executed successfully. To toggle the control without moving the mouse pointer, use wState
.
Example
To view an example that demonstrates how to use the ClickButton
method, see Selecting and Clearing Check Boxes.
See Also
Selecting and Clearing Check Boxes
ClickButton Action (Specific to MicrosoftCheckBox Controls)
wState Property (CheckBox and ToggleButton Controls)