A user can click, double-click or drag text, tree nodes and controls inside the application under test, minimize and maximize windows, focus controls, and so on. To simulate user actions, TestComplete programming objects have specific methods, properties and actions. An action is a
method of onscreen objects that simulate direct user actions during script execution. Each type of
onscreen object (for example,
Menu objects) supports specific actions. For instance, actions of the
Win32TreeView object allow you to select a tree view item or simulate a mouse click on it.
A typical sequence for simulating user actions include the following steps:
Obtaining a process, in which your scripts will simulate user actions.
Obtaining the application window, in which you are going to simulate user actions, and obtain the control(s) or child window, on which you are going to simulate user actions.
Simulating clicks, double-clicks, keypresses and other actions over the desired window (controls).
The way of performing simulation depends on the type of test you use. There are three kinds of tests, from which you can simulate user actions - keyword tests, scripts and low-level procedures. The topics of this section explain how to simulate user actions from tests.