Since TestComplete 5 is currently under development, the information contained in this article is not final and may change at any time.
TestComplete can work with all types of UI controls by simulating mouse clicks and keystrokes. The tested application will recognize these actions and respond to them as if it were a user working with the application. However, this approach does not work for some third-party controls. Due to specific implementation of these controls, they may respond to Windows messages in a non-standard fashion or ignore processing of certain messages.
For some third-party controls, TestComplete may not even be able to play back a recorded script successfully. This can happen, for instance, if third-party menu controls address items and submenus by an index and the index changes during the application run or between application runs.
Let's analyze a specific custom control example and demonstrate why no one can ensure stable playback of recorded scripts in this situation. The example works with MenuStrip, a new .NET control included in Visual Studio 2005. First we will record a script in TestComplete 4. Our task is to sequentially access the S5 item in the menu hierarchy created by features that are provided by the MenuStrip control. To continue working with the example, please make sure that the .NET Open Application Support plug-in is installed and enabled.
- Launch the application.
- Start recording.
- Click the Help | S1 item of the application's main menu, then click S2, S3 and so on. The following screenshot shows the actions to be performed:
After these operations are recorded, the following script is produced in TestComplete 4:
Please note that all submenu objects have identical properties, due to the control's architecture, thus when trying to play back this script in TestComplete 5, the expected actions were not performed.
AutomatedQA has now added a new tcThirdPartyControls.pls file to TestComplete 5 to resolve this issue. This file contains a collection of plug-ins that provides support for third-party menus. You can now enable and disable support for controls of a specific vendor individually (the complete list of plug-ins and supported controls can be found at the end of this article). The following screenshot shows the Install Extensions dialog containing specific plug-ins that provides support for Microsoft, Developer Express and Infragistics controls:
To be able to use the plug-ins from the third-party control support collection, please make sure that your applications are "open" for TestComplete 5 and the corresponding Open Application Support plug-ins are enabled.
Now we can use the above example to demonstrate the abilities of TestComplete 5 and the Microsoft Controls Support plug-in. Our task remains the same: to sequentially access the S5 item (the menu is created with the MenuStrip control). Before we continue with the example, we need to make sure that the .NET Open Application Support and Microsoft Controls Support plug-ins are installed and enabled. They make all .NET applications "open" to TestComplete, and allow for recording and playback of scripts over Microsoft's controls.
Now let's record the script and see the result:
As you can see, the
WinFormsObject("Form1") object that corresponds to a form on the tested application contains a new property – StripMainMenu. This property provides support for the main menu. During recording, the new property lets you create more readable and efficient code.
The plug-ins, supported controls and vendors are listed in the table below. The number of supported controls will be increased in future minor and major versions of the product:
|Plug-In Name ||Description |
|Component One Controls Support ||Provides access to the main menu created with the ComponentOne Menus and Toolbars for .NET Suite via the Window.C1MainMenu property. |
|Developer Express Components Support ||Provides access to the main menu created with the Developer Express XtraBars Suite via the Window.XtraMainMenu property. |
|Infragistics Controls Support ||Provides access to the main menu created with the Infragistics NetAdvantage via the Window.UltraMainMenu property. |
|Janus Systems Controls Support ||Provides access to the main menu created with the Janus UI Controls for .NET via the Window.UICtrlsMainMenu property. |
|Java Controls Support ||Provides access to a Java applications' main menu via the Window.JMainMenu property. |
|Microsoft Controls Support ||Provides access to the toolbar control created with the ToolStrip Class Library via the StripToolBar object. |
Provides access to the status bar control created with the StatusStrip Class Library via the StripStatusBar object.
Provides access to the main menu created with the MenuStrip Class Library via the Window.StripMainMenu property.
|Syncfusion Systems Controls Support ||Provides access to the main menu created with the Syncfusion Essential Studio via the Window.EssMainMenu property. |