PopupMenu Property (Window Objects)

Applies to TestComplete 14.0, last modified on January 23, 2019

Description

This property provides a scripting interface to the context (popup, right-click) menu of a window or control.

Declaration

TestObj.PopupMenu

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 object:

The top-level windows and controls.

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 context menu.

Remarks

  • Important: before using the context menu, open it on screen. To do this, call the ClickR method of the desired window or control, or send an Application keypress to it with the Keys method.

  • Using the returned Menu object, you can select items of the context menu. To do this, use the Click method. For more information on available menu actions, see the description of the Menu object.

  • For .NET application users: to access context menus created with the Microsoft MenuStrip Class Library, use the StripPopupMenu property rather than the PopupMenu property.

  • For Java application users: to access context menus of Java windows and controls, use the SwingPopupMenu property.

Example

To view an example that demonstrates how to use the PopupMenu property, see Entering Text into an Edit Control.

See Also

MainMenu Property
StripPopupMenu Property
SwingPopupMenu Property
SystemMenu Property
Simulating Menu Actions

Highlight search results