Differences Between Simulated User Actions and Real User Actions

Applies to TestComplete 15.69, last modified on November 13, 2024

TestComplete simulates user actions as close to real user actions as possible. In most cases, instead of calling respective events programmatically, TestComplete really moves the mouse pointer, performs clicks and dragging operations, etc.

However, there is a number of aspects that differ simulated actions from those of an actual user. Keep them in mind when creating tests.

  • By default, TestComplete uses the SetText action to input text in edit boxes. This action sets text programmatically (without typing it character-by-character) to improve the test execution speed. However, some controls rely on the events fired when the user enters text. Such events are not fired when the SetText action is used. If you need an event to fire, use the Keys action instead - it simulates typing text as a user would do this.

    You can define whether to use the SetText or Keys action via the TestComplete Record text input into simple editors as option.

  • TestComplete uses the ScrollIntoView method to scroll a web page and make the needed control visible on screen. This is not what a user would do, but this is what the web browser is expected to handle correctly.

  • When recording a test with a web application, TestComplete may record extra ToUrl method calls. They are not needed when navigation is performed programmatically or when the test actually clicks a link. Extra ToURL calls are recorded because TestComplete “does not know” if they are actually needed. So, review the recorded test and remove redundant method calls to avoid unneeded navigation.

See Also

Simulating User Actions
Simulating Keystrokes in Browsers

Highlight search results