Open topic with navigation

com.hp.lft.sdk.sap.gui

## Interface Menubar

- All Superinterfaces:
    Element, LocationInfoProvider, SupportsNativeObject, TestObject, TestObjectDescriber

      public interface Menubar
      extends Element

  A menubar control in a SAP GUI for Windows application.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `buildMenuPath(java.lang.Object... menuPathParts)` Returns the path of the specified menu item.
    `java.util.List<java.lang.String>` | `getItems()` Returns the list of the items in the menu bar.
    `void` | `select(java.lang.String path)` Selects an item from the menu bar.

    - ### Methods inherited from interface com.hp.lft.sdk.sap.gui.Element

      `getId, getName, getType`

    - ### 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`

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

      `getAbsoluteLocation, getLocation, getSize`

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

      `getNativeObject`

- - ### Method Detail

    - #### getItems

          java.util.List<java.lang.String> getItems()
                                             throws GeneralLeanFtException

      Returns the list of the items in the menu bar.
      Returns:
        the list.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### buildMenuPath

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

      Returns the path of the specified menu item.
      Parameters:
        `menuPathParts` - The menu path elements can be: logical name(string), full path(string), or numeric index(int). Index values are 1-based. Separate path elements with a semicolon (;).
      Returns:
        the path of the specified menu item.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

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

      Selects an item from the menu bar. You can use the buildMenuPath method to build the item path string to be used as the itemPath argument for this method.
      Parameters:
        `path` - the full path of the menu item to select. The path is composed of the menu and sub-menu item names and/or numeric index numbers.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.