Adding Context Menu Items

Context menu items are actions that are displayed to the user when he/she right-clicks on something. Alternatively referred to as local, shortcut or right-click menu items, they can be interrogated and included in OpenSpan automations, for windows and web-based applications.

When using context menu items in OpenSpan automations you must include in the automation a method that causes the context menu to display. Common methods used to open a context menu are PerformRightClick and ShowContextMenu. Always try PerformRightClick first as it is a method most often recognized by applications.

To add a context menu item to an OpenSpan solution

  1. Start Interrogation of the target application.

  2. Interrogate the target application control/object (e.g., list box, data grid) associated with the context menu you want to include in your OpenSpan solution.

  3. Without stopping interrogation of the target application, change focus to the OpenSpan Object Explorer.

  4. In the Object Explorer, right-click the target application window object and select Add Context Menu Items from the Context menu, or, from the Windows tab, highlight the target, right-click and select Add Context Menu Items.

  5. Change focus back to the target application, and right-click to open the context menu you want to interrogate..

  6. Instead of the context menu opening, the Add Context Menu Items dialog displays populated with the context menu items.

  7. Select the check boxes for the context menu items you want to include in your solution and then close the dialog box to save your selections. An example of the Add Context Menu Items dialog is shown below with menu items selected.

  8. The selected context menu items now appear in the Object Explorer and the associated properties, methods and events can be incorporated in your OpenSpan automations.

  9. Stop interrogation.

See also

Add Menu Items