Share this page

com.hp.lft.sdk.stdwin

## Interface Menu

- All Superinterfaces:
    TestObject, TestObjectDescriber

      public interface Menu
      extends TestObject

  A standard Windows menu.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `buildMenuPath(java.lang.Object... menuPathParts)` Returns the path of the specified menu item.
    `MenuItem` | `getItem(java.lang.String itemPath)` Returns the menu item with the specified path.
    `MenuType` | `getType()` Returns the type of the menu.
    `void` | `select(MenuItem item)` Selects the specified item in the menu by `MenuItem`.
    `void` | `select(java.lang.String itemPath)` Selects the specified item in the menu by path.

    - ### Methods inherited from interface com.hp.lft.sdk.TestObject

      `exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExists`

    - ### Methods inherited from interface com.hp.lft.sdk.TestObjectDescriber

      `describe`

- - ### Method Detail

    - #### buildMenuPath

          java.lang.String buildMenuPath(java.lang.Object... menuPathParts)

      Returns the path of the specified menu item.
      Parameters:
        `menuPathParts` - the menu path parts can be: logical name(string), full path(string), or numeric index(int).
        Index values are 1-based. For a full path, separate items with commas.
      Returns:
        the menu path

    - #### getType

                                                      MenuType getType()
                    throws GeneralLeanFtException

      Returns the type of the menu. Possible values: `MenuType`
      Returns:
        the type of the menu.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(MenuItem item)
               throws GeneralLeanFtException

      Selects the specified item in the menu by `MenuItem`.
      Parameters:
        `item` - specified menu item to select from the menu.
        Tip: Use the GetItem method to get the item to be used as the item argument for this method.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(java.lang.String itemPath)
               throws GeneralLeanFtException

      Selects the specified item in the menu by path.
      Parameters:
        `itemPath` - the full path of the menu item to return. To specify the index of the item to select, use <Item #>.
        Index values begin with 1.
        Tip: Use the BuildMenuPath method to build the item path string to be used as the itemPath argument for this method
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getItem

                                                      MenuItem getItem(java.lang.String itemPath)
                    throws GeneralLeanFtException

      Returns the menu item with the specified path. Tip: To check whether the item exists, use the MenuItem.Exists property.
      Parameters:
        `itemPath` - the full path of the menu item to return. To specify the index of the item to select, use <Item #>.
        Index values begin with 1.
        Tip: Use the BuildMenuPath method to build the item path string to be used as the itemPath argument for this method.
      Returns:
        the menu item (MenuItem) found at the specified item path
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

Tips to improve your search results... UFT Developer Java SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: