ClickButton Action (Button Controls)

Applies to TestComplete 15.45, last modified on December 01, 2022
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:

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)

Highlight search results