PopupMenuFunctions

Last Updated:

Actions for ACTIVE Popup Menus

Actions for ACTIVE Popup Menus.
The popup menu must usually already be up and active for each of these Actions.

It is important to recognize certain issues with Popup menus, especially as we need to differentiate between Java popups and Win32 popups.

Win32 popup menus are generally found as the topmost active popup window. Because of this, we generally can just look for the topmost active popup window and we don't need any type of recognition information to locate it.

Java popup menus are generally NOT implemented as normal Win32 popup menus and we generally DO need to have window and component recognition information for Java popup menus.

For RC and Win32 popups: Unless otherwise indicated, the Window and Component references are not used and can be anything. They just cannot be blank.

For Java popups: Unless otherwise indicated, valid recognition information for the Java window and "child" popup menu must be provided.

Also refer to JavaMenuFunctions for support specific to Java menus and popup menus.



[How To Read This Reference]
SelectPopupMenuID
RC
Select a menuItem via its menuID in the currently active popup menu.
SelectPopupMenuItem
RC RJ TC
Select a menuItem via its text in the currently active popup menu.
SelectUnverifiedPopupMenuItem
RC RJ TC
Select a menuItem via its text in the currently active popup menu without verification.
VerifyPopupMenu
RC RJ
Verify the complete status of the current popup menu with a benchmark file.
VerifyPopupMenuID
RC
Verify the state of a menuItem via its menuID in the currently active popup menu.
VerifyPopupMenuItem
RC RJ
Verify the state of a menuItem found via its text in the currently active popup menu.
VerifyPopupMenuPartialMatch
RJ
Verify if a menuItem contains a substring

PopupMenuFunctions::SelectPopupMenuID
RC

Select a menuItem via its menuID in the currently active popup menu.

Attempts to select a particular menuID in the currently active popup menu. This is generally used when the menuitem is a bitmap or other item that does not have text. This value can be retrieved from the the menu by index or by manual lookup from a menu structure output from MenuUtilities.

The routine first verifies that the specified menuitem exists and exits with error if it does not. If it does exist then the selection proceeds.

For RC and Win32 popups: The Window and Component references are not used and can be anything. They just cannot be blank.



Fields: [ ]=Optional with Default Value
  1. MenuItemID
    The Windows menuID of the menuItem to select.


Examples:
[How To Read This Reference]

PopupMenuFunctions::SelectPopupMenuItem
RC RJ TC

Select a menuItem via its text in the currently active popup menu.

Attempts to select a particular text string menuitem in the currently active popup menu. The menuitem should be specified in the form "Menu->Menu->MenuItem CTRL+V" with the full text, spaces(if any), and keyboard shortcut text (if any).

Ampersands preceding underlined characters are optional. The routine first verifies that the specified menuitem exists and exits with error if it does not. If it does exist then the selection proceeds using the MenuID retrieved from the found menuitem.

For RC and Win32 popups: The Window and Component references are not used and can be anything. They just cannot be blank.

For Java popups: Valid recognition information for the Java window and "child" popup menu must be provided.

Also refer to JavaMenuFunctions for support specific to Java menus and popup menus.

TC Note:Component can be the object who contains 'popup menu', or it can be the 'context menu' object.



Fields: [ ]=Optional with Default Value
  1. MenuItemText
    Menu->MenuItem hierarchy to the menuItem to select.

    Menu->MenuItem hierarchy string to identify which menuitem to select.
    NOTE:SQA can only handle submenus up to 5 levels deep.
    NOTE:For RJ implementation, this field is optional if the "child" is a "MenuItem"


Examples:
[How To Read This Reference]

PopupMenuFunctions::SelectUnverifiedPopupMenuItem
RC RJ TC

Select a menuItem via its text in the currently active popup menu without verification.

Attempts to select a particular text string menuitem in the currently active popup menu. This routine performs no verification prior to or following the selection. This may cause a Rational error if the Popup Menu or selected menu item is not available.

The menuitem should be specified in the form "Menu->Menu->MenuItem CTRL+V" with the full text, spaces(if any), and keyboard shortcut text (if any).

Ampersands preceding underlined characters are optional.

For RC and Win32 popups: The Window and Component references are not used and can be anything. They just cannot be blank.

TC Note:Component can be the object who contains 'popup menu', or it can be the 'context menu' object.



Fields: [ ]=Optional with Default Value
  1. MenuItemText
    Menu->MenuItem hierarchy to the menuItem to select.

    Menu->MenuItem hierarchy string to identify which menuitem to select.
    NOTE:SQA can only handle submenus up to 5 levels deep.


Examples:
[How To Read This Reference]

PopupMenuFunctions::VerifyPopupMenu
RC RJ

Verify the complete status of the current popup menu with a benchmark file.

Verify the complete status of the current popup menu with a benchmark file.
Typically, benchmarks are stored in the Datapool\Bench directory. In that event, only the filename.ext is needed. There is currently a limit of 32K allowed for this type of comparison.
The Window and Component objects are not validated and have no role. The Window and Component strings can be any text, but they cannot be blank.

Due to the nature of the verification using a DOS file comparison, the popup menu will no longer be present after the verification and must be reactivated if additional popup menu activity is to occur.



Fields: [ ]=Optional with Default Value
  1. BenchmarkFile
    The name.ext of the file used as the comparison benchmark.

    The name.ext of the file used as the comparison benchmark.
    Typically, benchmarks are stored in the Datapool\Bench directory. In that event, only the filename.ext is needed. Otherwise, the full file path is needed.


  2. [ HeaderText = ]
    Optional descriptive header line of text to match with the benchmark.

    Optional header line of text to match with the benchmark.
    If the benchmark file was created with or contains an initial line of descriptive text then that line must be provided here for the comparison to be successful.


  3. [ ActualFile = ]
    The optional name.ext of the file used for the captured menu status.

    The optional name.ext of the file used for the captured menu status.
    Typically, actuals are stored in the Datapool\Test directory with the same name as the benchmark file. Thus, you would normally leave this blank.


  4. [ DiffFile = ]
    The optional name.ext of the file used to contain the differences found.

    The optional name.ext of the file used to contain the differences found.
    Typically, diffs are stored in the Datapool\Dif directory with the same name as the benchmark file. Thus, you would normally leave this blank.


Examples:
[How To Read This Reference]

PopupMenuFunctions::VerifyPopupMenuID
RC

Verify the state of a menuItem via its menuID in the currently active popup menu.

Verify the state of a particular menuID in the currently active popup menu. This is generally used when the menuitem is a bitmap or other item that does not have text. This menuID can be retrieved from the the menu by index or by manual lookup from a menu structure output from MenuUtilities.

The routine first verifies that the specified menuitem exists and exits with error if it does not.

For RC and Win32 popups: The Window and Component references are not used and can be anything. They just cannot be blank.



Fields: [ ]=Optional with Default Value
  1. MenuItemID
    The Windows menuID of the menuItem to verify.


  2. StateInfo
    Expected status string (or part thereof) to verify.

    Expected status string (or part thereof) to verify. Ex: "Enabled Checked" OR "Disabled Grayed" etc. Each item separated by a space will be evaluated separately so the order of the status items does not matter. These status items (listed below) currently ARE case-sensitive.

    "Enabled" "Grayed" "BarBreak" "Bitmap" "Disabled" "Ungrayed" "Separator" "Break" "Checked" "Hilited" "Default" "Menu With N MenuItems" "Unchecked" "Unhilited" "Normal" (not default)



Examples:
[How To Read This Reference]

PopupMenuFunctions::VerifyPopupMenuItem
RC RJ

Verify the state of a menuItem found via its text in the currently active popup menu.

The menuitem should be specified in the form "Menu->Menu->MenuItem CTRL+V" with the full text, spaces(if any), and keyboard shortcut text (if any).

Ampersands preceding underlined characters are optional. The routine first verifies that the specified menuitem exists and exits with error if it does not.

For RC and Win32 popups: The Window and Component references are not used and can be anything. They just cannot be blank.

For Java popups: Valid recognition information for the Java window and "child" popup menu must be provided.

Also refer to JavaMenuFunctions for support specific to Java menus and popup menus.



Fields: [ ]=Optional with Default Value
  1. MenuItemText
    Menu->MenuItem hierarchy to the menuItem to verify.

    Menu->MenuItem hierarchy string to identify which menuitem to verify.
    NOTE:SQA can only handle submenus up to 5 levels deep.

    For RC and Win32 popups: The Window and Component references are not used and can be anything. They just cannot be blank.

    For Java popups: Valid recognition information for the Java window and "child" popup menu must be provided.

    Also refer to JavaMenuFunctions for support specific to Java menus and popup menus.



  2. StateInfo
    Expected status string (or part thereof) to verify.

    Note: this parameter is partial supported for RJ.

    Expected status string (or part thereof) to verify. Ex: "Enabled Checked" OR "Disabled Grayed" etc. Each item separated by a space will be evaluated separately so the order of the status items does not matter. These status items (listed below) currently ARE case-sensitive.

    "Enabled" "Grayed" "BarBreak" "Bitmap" "Disabled" "Ungrayed" "Separator" "Break" "Checked" "Hilited" "Default" "Menu With N MenuItems" "Unchecked" "Unhilited" "Normal" (not default)

    "Enabled" "Grayed" "Bitmap" "Disabled" "Ungrayed" "Separator" "Checked" "Unchecked" "Menu With N MenuItems" are supported by RJ.



Examples:
[How To Read This Reference]

PopupMenuFunctions::VerifyPopupMenuPartialMatch
RJ

Verify if a menuItem contains a substring

Verify if a menuItem contains a substring

For Java popups: Valid recognition information for the Java window and "child" popup menu must be provided.

Also refer to JavaMenuFunctions for support specific to Java menus and popup menus.



Fields: [ ]=Optional with Default Value
  1. MenuItemText
    Menu->MenuItem hierarchy substring to the menuItem to search for.

    Menu->MenuItem hierarchy substring to identify which menuitem to search for.

    For Java popups: Valid recognition information for the Java window and "child" popup menu must be provided.

    Also refer to JavaMenuFunctions for support specific to Java menus and popup menus.



Examples:
[How To Read This Reference]