[Collapse]TestComplete/viewarticle/63445/
 [Expand]General Information/viewarticle/63445/
 [Expand]Using Help System/viewarticle/55799/
 [Expand]Getting Started Tutorial/viewarticle/56246/
 [Expand]Using TestComplete/viewarticle/57875/
 [Expand]Testing Types/viewarticle/62721/
 [Expand]Applications Testing/viewarticle/62606/
 [Expand]Working With Application Objects and Controls/viewarticle/55815/
 [Expand]Samples and Tutorials/viewarticle/56239/
 [Expand]References/viewarticle/57878/
 [Expand]Other Tools That Help You Test Better/viewarticle/63442/
 [Expand]TestComplete 10 Licensing Guide/viewarticle/63451/
Updated: 7/17/2014 Applies To: TestComplete 10 Rating: Not badNot badNot badNot badNot bad 1 vote(s) 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


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