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
Entering Text into an Edit Control
Copying and Pasting Text in an Edit Control
Selecting Text Within an Edit Control
Getting the Selected Text in an Edit Control
Entering Passwords into an Edit Control
Replacing Text in an Edit Control
Setting Insertion Point in an Edit Control
Undoing and Redoing Actions in an Edit Control
Determining Maximum Text Length in an Edit 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
Related Topics of Interest
See Also
Win32 Edit Support
Object-Specific Tasks
Supported Controls
Default Project Properties - Object Mapping Options