Working With Edit Controls

Applies to TestComplete 14.30, last modified on November 21, 2019

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.

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

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

Entering Text into an Edit Control

Describes how to enter text into the edit control.

Copying and Pasting Text in an Edit Control

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

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

Getting the Selected Text in an Edit Control

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

Entering Passwords into an Edit Control

Describes how to enter password symbols within an edit control.

Replacing Text in an Edit Control

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

Setting Insertion Point in an Edit Control

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

Undoing and Redoing Actions in an Edit Control

Explains how to cancel and redo recent operation.

Determining Maximum Text Length in an Edit Control

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:

Working With Multiline Edit Controls - Specifics

Describes specific features of multiline controls.

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

Highlight search results