MainMenu Property

Applies to TestComplete 14.40, last modified on April 22, 2021

Description

This property provides a scripting interface to the window's main menu.

Declaration

TestObj.MainMenu

Read-Only Property A Menu object
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following objects:

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Property Value

A Menu object that corresponds to the window's main menu.

Remarks

After you obtain the menu, you can select items from this menu using the returned object. See the description of the Menu Object for more information on available menu actions.

To access a Java application’s main menu or menus created with other popular components, use the following properties (these properties are added to the Window object if the corresponding extension for the custom component is installed):

Property Component Name
Window.ActionMainMenu Borland Action Menu Bar
Window.C1MainMenu ComponentOne Menus and Toolbars
Window.EssMainMenu Syncfusion Essential Tools Menus
Window.JMainMenu Java Application Main Menu
Window.StripMainMenu Microsoft MenuStrip Class Library
Window.UICtrlsMainMenu Janus UI Controls
Window.UltraMainMenu Infragistics UltraWinToolbars
Window.XtraMainMenu Developer Express XtraBars

Example

To view an example that demonstrates how to use the MainMenu property, see Simulating Menu Actions.

See Also

MainMenu Property
SystemMenu Property
Simulating Menu Actions

Highlight search results