Recording Specifics

Applies to TestComplete 15.63, last modified on April 23, 2024

General recording specifics

When recording user actions, TestComplete takes into account various factors and events that occur in the system and in the application under test. These factors and events affect the test commands that TestComplete records:

  • During recording, TestComplete recognizes windows and controls with which you are working, and records user actions as calls to methods and properties of these objects. If it is impossible to do that, TestComplete resorts to recording mouse clicks with coordinates and keyboard events. Low-level recording like mouse movements or pressing and releasing mouse buttons is also possible, but in many cases it is not so convenient as object-level recording.

  • Depending on the tested application and on its controls, keyboard input can be recorded with the SetText or Keys method call.

  • Some third-party software can prevent recording keyboard events.

We recommend that you read the Recording Specifics topic that mentions the points you should pay your attention to and describes possible issues and workarounds. The sections below describe the specifics of recording tests for desktop applications.

Open File and Save File dialogs

  • To select files in the Open File and Save File dialogs, you can use the OpenFile and SaveFile methods. However, TestComplete may fail to record these methods. Instead, TestComplete will record interactions with elements of the Open File or Save File dialog. However, you can modify the recorded test and replace the recorded actions manually with the OpenFile or SaveFile method.

  • Most applications use the standard Save File dialog to store data to external files. When recording tests, TestComplete records user actions over this dialog as well as over other application windows and dialogs. For example, when you save data to a new file, TestComplete records calling the Save File dialog and specifying the file where the data will be saved. However, if you run your test when the specified file already exists, the dialog will ask whether to replace the existing file with the new one. As the actions over the appeared dialog were not recorded, the test will fail. To avoid this problem, you should also record user actions over the dialog asking whether to replace files or delete the stored file before running the test.

    For more information about support for the Save File dialog in TestComplete, see Working With Open File and Save File Dialogs.

Java applications

Due to specifics of the AWT library, TestComplete cannot record actions with menu controls of the java.awt.PopupMenu class. As a workaround you can:

– or –

  • Write the needed script code manually.

– or –

  • Use javax.swing.JPopupMenu menus instead of java.awt.PopupMenu in your application.

Qt applications

  • Regardless of whether the Record text input into simple editors as radio button is selected or not, for the QtLineEdit and QtTextEdit objects, TestComplete always records text input by using the Keys method.

  • In some cases, TestComplete cannot access objects and their methods in tested Qt applications and cannot record user actions over them. The possible issues are:

    • TestComplete recognizes context menu items and their subitems as siblings (items of the same level). This happens because the subitems are not child items of the context menu items to which they correspond. To solve the problem, you can ask your application's developers to associate the context menu items with the appropriate subitems in the application.

    • TestComplete may fail to access objects, their properties and methods in a tested Qt application if the following modules have been modified or renamed:

      • QtNGui.dll

      • QtNCore.dll

      • and QtNWidgets.dll

      Where N is the used Qt version number.

      Do not rename or modify these modules.

See Also

Desktop Application Testing
Recording Specifics (General)

Highlight search results