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