Recording Specifics

Applies to TestComplete 15.20, last modified on January 19, 2022

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 TestComplete, you can record user actions against Qt applications (both 32-bit and 64-bit). TestComplete treats Qt applications as Open and recognizes all their internal objects, methods and properties. However, in some cases TestComplete cannot access the tested application’s objects (or object methods). 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 recognize an application as Open although Qt Application Support and Qt Control Support and enabled (they are installed and enabled by default). Most likely, this can happen if you have modified or renamed some Qt modules that TestComplete uses to access the internals of the tested Qt applications.

      Do not rename the following modules:

      • Qt5Gui.dll,

      • Qt5Core.dll,

      • and Qt5Widgets.dll.

      Otherwise, TestComplete will fail to access the internal objects, methods and properties of your tested application.

    For more information on the problems, see Troubleshooting Qt Applications.

See Also

Desktop Application Testing
Recording Specifics (General)

Highlight search results