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
SetTextaction 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
SetTextaction is used. If you need an event to fire, use the
Keysaction instead - it simulates typing text as a user would do this.
You can define whether to use the
Keysaction via the TestComplete Record text input into simple editors as option.
TestComplete uses the
ScrollIntoViewmethod 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
ToUrlmethod calls. They are not needed when navigation is performed programmatically or when the test actually clicks a link. Extra
ToURLcalls 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.