[Expand]General Information/viewarticle/88628/
 [Expand]Using Help System/viewarticle/81465/
 [Expand]Getting Started Tutorial/viewarticle/82003/
 [Expand]Using TestComplete/viewarticle/84431/
 [Expand]Testing Types/viewarticle/85355/
 [Expand]Applications Testing/viewarticle/83383/
 [Collapse]Working With Application Objects and Controls/viewarticle/81481/
  [Expand]General Information/viewarticle/88368/
  [Expand]Common Tasks/viewarticle/82014/
  [Collapse]Simulating User Actions/viewarticle/82013/
    Simulating User Actions on Application Windows/viewarticle/83213/
    Simulating Menu Actions/viewarticle/86484/
    Simulating Mouse Actions/viewarticle/85133/
    Simulating Mouse Wheel Rotation/viewarticle/87817/
    Simulating Selection of Items and Nodes/viewarticle/85978/
    Simulating Keystrokes/viewarticle/84197/
    Differences Between Simulated User Actions and Real User Actions/viewarticle/86667/
  [Expand]Object-Specific Tasks/viewarticle/86907/
 [Expand]Samples and Tutorials/viewarticle/81997/
 [Expand]Other Tools That Help You Test Better/viewarticle/82893/
 [Expand]TestComplete Licensing Guide/viewarticle/88365/
Updated: 10/12/2016 Applies To: TestComplete 12 Rating: No votes Click to rate: PoorNot badAverageGoodExcellent
Simulating User Actions

Differences Between Simulated User Actions and Real User Actions

TestComplete attempts to simulate 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 TestComplete’s 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

© 2016 SmartBear Software. All rights reserved.
Email Send feedback on this document