Working With HotKey Controls in Desktop Windows Applications

Applies to TestComplete 15.70, last modified on December 17, 2024

TestComplete offers a set of functions to work with standard Win32 controls from your tests, including the HotKey control. This control allows you to create key combinations that can be used as shortcuts.

In the tested application, TestComplete associates HotKey controls with the Win32HotKey object by analyzing the controls’ class names. Class names of standard HotKey controls are listed in the project’s Object Mapping options. If your tested application uses a HotKey control that is inherited from a standard HotKey control, you can associate it with the Win32HotKey object by adding its class name to the Object Mapping list.

You can use properties and methods of this object to work with the HotKey control. For instance, you can use these properties to set and get the text of the HotKey control. The topics of this section describe how to work with HotKey controls.

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

Getting HotKey Text in Desktop Windows Applications

Describes how to get the text displayed in the HotKey control

Setting HotKey Text in Desktop Windows Applications

Explains how to set the text displayed in the HotKey control

Related Topics of Interest

Simulating User Actions

Explains the approaches used to simulate user actions over applications’ controls.

See Also

Win32 HotKey Support
Object-Specific Tasks
Supported Controls
Default Project Properties - Object Mapping Options

Highlight search results