Simulating User Actions

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

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, Window, Win32Button or 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:

  1. Obtaining a process, in which your scripts will simulate user actions.

  2. 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.

  3. 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.

In This Section

Simulating User Actions on Application Windows

Describes script routines and keyword test operations that are used to activate, close, maximize and minimize a window, restore position and perform other actions on windows.

Simulating Menu Actions

Explains which keyword test operations, script objects and routines you can use to simulate user actions on menus and context menus.

Simulating Mouse Actions

Describes how to simulate mouse events from keyword tests and script routines.

Simulating Mouse Wheel Rotation

Describes how to simulate mouse wheel rotation from keyword tests and script routines.

Simulating Selection of Items and Nodes

Explains how to select items and nodes in tree view, list box, list view and other similar controls.

Simulating Keystrokes

Explains how to simulate keystrokes on windows and controls.

Differences Between Simulated User Actions and Real User Actions

Lists the known differences between actions of real users and actions simulated by TestComplete.

See Also

Working With Application Objects and Controls
Creating and Recording Keyword Tests
Script Tests
Creating and Recording Low-Level Procedures

Highlight search results