Working With Button Controls in Desktop Windows Applications

Applies to TestComplete 15.69, last modified on November 13, 2024

Note: To learn how to simulate user actions over button controls in web applications, see Working With Button Controls in Web Applications.

TestComplete supports most standard Windows controls, including button controls. To work with Win32 button controls, it uses the Win32Button object. This object is automatically associated with button controls whose class names are listed in the project’s Object Mapping options. If your tested application uses custom button controls, you can add their class names to the Object Mapping list and thus associate them with the Win32Button object as well. See Default Project Properties - Object Mapping Options for more information.

You can work with button controls using the methods and properties of the Win32Button object. In addition, if the tested application is an Open Application, you can access the internal methods and properties of the button control and use them in tests. To learn which button members are available to your tests, explore the button control in the Object Browser.

The topics of this section discuss common operations that can be performed over Win32 button controls. To learn about working with Android button controls see Working With Android Button Controls section.

Note: Though the following topics deal with scripts, you can use the same approaches while testing an application from your keyword tests. For more information, see Keyword Tests Basic Operations.

In This Section

Clicking a Button in Desktop Windows Applications

Explains how to click a button.

Checking a Button's State in Desktop Windows Applications

Contains information on how to determine whether a button is enabled or not.

Getting a Button's Image in Desktop Windows Applications

Describes how to obtain a button’s image.

Related Topics of Interest

Working With Check Box Controls in Desktop Windows Applications

Describes how you can perform various operations over check box controls using TestComplete.

Working With Radio Button Controls in Desktop Windows Applications

Explains how to simulate actions over radio button controls with TestComplete.

Simulating User Actions

Explains the most common approaches for simulating user actions over applications’ controls.

See Also

Win32 Button Support
Object-Specific Tasks
Supported Controls
Default Project Properties - Object Mapping Options
Working With Button Controls in Web Applications

Highlight search results