PopupSelect Method

Class

AnyWin class.

Action

Selects an item from a popup menu that is not implemented as a distinct window and that appears when a user presses the right mouse button at a certain location within a window.

Availability

This method is supported only in scripts that use the Classic Agent. For scripts that use the Open Agent, use the OpenContextSelect method.

Syntax

window.PopupSelect (iXpos, iYpos, sItem)
Variable Description
iXpos The horizontal coordinate (relative to window) at which to press the mouse. INTEGER.
iYpos The vertical coordinate (relative to window) at which to press the mouse. INTEGER.
sItem The item to select. STRING.

Notes

When you are working with the SilkBean, insert a right-mouse Click() before PopupSelect.

PopupSelect selects an item by pressing the right mouse button at the specified coordinates of window, then selecting sItem from the popup menu that displays.

You can use PopupSelect wherever pressing the right mouse button displays a popup menu.

After selecting the item, Silk Test Classic verifies that the item was selected, and raises the exception E_CONTROL_NOT_RESPONDING if it was not.

To select an item from a standard popup list, use the Select method.

Example

MainWin.PopupSelect (20, 30, "MyListItem")