Applications use toolbar controls to provide access to the application’s key commands and tools. A window can have any number of toolbars, they can be organized into several rows, displayed or hidden at the user’s desire, and so on.
With TestComplete, you can record and play back various user actions over windows’ toolbars. TestComplete provides a number of program objects that let you work with toolbars in various application types:
Win32ToolBar-- Provides a scripting interface to Win32 toolbars.
StripToolBar-- Provides a scripting interface to .NET ToolStrip toolbars.
WPFToolBar-- Provides scripting access to WPF (XAML) toolbars.
By default, these objects can only be used to work with the corresponding “standard” controls. You can find the list of supported toolbar classes in the project’s Object Mapping options. However, you can also associate a custom toolbar control with one of these objects by adding its class name to the Object Mapping list. This will let you record and simulate actions over your custom control using the methods and properties of the associated scripting object. See Object Mapping for more information.
Besides the mentioned toolbars, TestComplete can also recognize individual toolbar buttons in Java Swing applications, and works with them using the
JButton object methods and properties.
The topics of this section provide detailed information on working with Win32, WPF and .NET toolbar controls in TestComplete and contain sample scripts that demonstrate how you can do this. To learn how to work with Android action bar controls, see the Working With Android Action Bar Controls section.
|Note:||Though the following topics deal with scripts, you can use the same approaches while testing an application from your keyword tests. For more information, see Keyword Tests Basic Operations.|