This method is not supported in web tests (including cross-platform web tests) that use XPath expressions and CSS selectors to locate web elements. This method can be only used in tests that locate web objects by using internal identification properties provided by TestComplete. |
Description
The ClickButton
action moves the mouse pointer to the specified button and then simulates a single click.
Declaration
TestObj.ClickButton()
TestObj | A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section | |||
Result | None |
Applies To
The method is applied to the following objects:
AngularUI Bootstrap Button, Bootstrap Button, Developer Express Button and 20 more objects, Developer Express SimpleButton, Ext JS Button, Flash Button, Flex Button, GWT PushButton, Infragistics UltraButton, Java Swing Button, JavaFX Button, jQuery Mobile Button, jQuery UI Button, Oracle Forms Button, Qt PushButton, SAP GUI Button, Silverlight Button, Telerik RadButton for WinForms, TMS TAdvGlowButton, Win32 Button, WPF Button, YUI 2 Link Button, YUI 2 Push 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.
Result Value
None.
Remarks
For Infragistics UltraDropDownButton controls: a click on the InfragisticsWinDropDownButton
control can be performed only if the control has the SplitButton
style. Otherwise, if the control has the DropDownButton
style, the method fails and posts an error message to the test log. The style of the WinDropDownButton
can be determined with the native Style
property of the control.
For YUI 2 Split Button controls: a click is simulated on the button part of the control. To open or close the control’s drop-down window, call the CloseUp
and DropDown
methods.
Example
To view an example that demonstrates how to use the ClickButton
method, see Clicking a Button in Desktop Windows Applications.
See Also
Clicking a Button in Desktop Windows Applications
ClickButton Action (Specific to QtToolButton Controls)