Working With Edit Controls in Desktop Windows Applications

Applies to TestComplete 15.63, last modified on April 23, 2024

Note: To learn how to simulate user actions over text edit box controls in web applications, see Working With Text Edit Controls in Web Applications.

TestComplete lets you record and replay user actions over most standard Windows controls, including edit controls. To work with Win32 edit controls, it uses the Win32Edit object. This object is automatically associated with edit controls whose class names are listed in the project’s Object Mapping options. If your tested application uses custom edit controls, you can associate them with the Win32Edit object by adding their class names to the Object Mapping list. For more information, see Default Project Properties - Object Mapping Options.

Please note that the maximum character limit for text input is 259 characters.

The Win32Edit object’s methods and properties let you perform various operations over edit controls. In addition, if the tested application is an Open one, TestComplete can access the edit control’s internal methods, properties and fields, so that you can use them in your tests as well. To learn the edit control’s functionality that is available to your tests, explore the edit control in the Object Browser.

The topics of this section describe the operations you can perform over the text within the Win32 edit control. To learn about working with Android edit text controls see Working With Android Edit Text 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

Getting an Edit Control's Text in Desktop Windows Applications

Describes the approaches that can be used to get data stored in the edit control.

Entering Text into an Edit Control in Desktop Windows Applications

Describes how to enter text into the edit control.

Copying and Pasting Text in an Edit Control in Desktop Windows Applications

Describes how to get data from an edit control to the clipboard and insert data from the clipboard to an edit control.

Selecting Text Within an Edit Control in Desktop Windows Applications

Describes the approaches that can be used to select text within an edit control.

Getting the Selected Text in an Edit Control in Desktop Windows Applications

Explains how to get the selected data within an edit control.

Working With Passwords Within an Edit Control in Desktop Windows Applications

Describes how to work with password symbols within an edit control.

Replacing Text in an Edit Control in Desktop Windows Applications

Describes the approaches that can be used to replace text within an edit control.

Setting Insertion Point in an Edit Control in Desktop Windows Applications

Describes how to set the insertion point within an edit control.

Undoing and Redoing Actions in an Edit Control in Desktop Windows Applications

Explains how to cancel and redo recent operation.

Determining Maximum Text Length in an Edit Control in Desktop Windows Applications

Describes how to get information about the text limits of the current control.

The topics mentioned above describe the basic principles of working with edit controls. These principles are similar for single-line and multiline controls. Though multiline controls have some specifics, which are stated in the following topic:

Related Topics of Interest

Simulating User Actions

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

See Also

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

Highlight search results