Share this page

com.hp.lft.sdk.wpf

## Interface Menu

- All Superinterfaces:
    Clickable, DoubleClickable, LocationInfoProvider, SupportDragAndDrop, SupportSendKeys, SupportsNativeObject, TestObject, TestObjectDescriber, UiObjectBase, VisibleProvider, WaitUntilVisibleProvider, WaitUntilEnabledProvider, EnabledProvider

      public interface Menu
      extends UiObjectBase, TestObject

  A .NET WPF menu object.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `buildMenuPath(java.lang.Object... menuPathParts)` Returns the path constructed from the path parts.
    `MenuItem` | `getItem(java.lang.String itemPath)` Returns the item at the specified path in the menu.
    `void` | `select(MenuItem item)` Selects the specified item in the menu. You can use `getItem(String)` to get the item to use as the item argument.
    `void` | `select(java.lang.String itemPath)` Selects the item at the specified path in the menu. You can use `buildMenuPath(Object...)` to build the itemPath argument.

    - ### Methods inherited from interface com.hp.lft.sdk.wpf.UiObjectBase

      `canFocus, getAttachedText, getFullNamePath, getFullType, getObjectName, getObjectProperty, getText, makeVisible, showContextMenu`

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

      `getHandle, getNativeClass, getWindowTitleRegExp, isEnabled, isFocused, isVisible, mouseMove`

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

      `click, click, click`

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

      `doubleClick, doubleClick, doubleClick`

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

      `getAbsoluteLocation, getLocation, getSize`

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

      `sendKeys, sendKeys`

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

      `dragAndDropOn, dragAndDropOn`

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

      `getNativeObject`

    - ### 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.WaitUntilEnabledProvider

      `waitUntilEnabled, waitUntilEnabled`

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

      `isEnabled`

- - ### Method Detail

    - #### buildMenuPath

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

      Returns the path constructed from the path parts.
      Parameters:
        `menuPathParts` - The menu path parts can be: logical name(string), full path(comma-separated strings), or index(1-based).
      Returns:
        the path of the specified menu item.

    - #### select

          void select(MenuItem item)
               throws GeneralLeanFtException

      Selects the specified item in the menu.
      You can use `getItem(String)` to get the item to use as the item argument.
      Parameters:
        `item` - item to select
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

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

      Selects the item at the specified path in the menu.
      You can use `buildMenuPath(Object...)` to build the itemPath argument.
      Parameters:
        `itemPath` - the path of the item to select. To specify the 1-based index of the item to select, use <Item #>.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getItem

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

      Returns the item at the specified path in the menu.
      Parameters:
        `itemPath` - the full path of the menu item to select from the list. The path is composed of the menu item names or a 1-based index separated by a semicolon. To specify the 1-based index of the item to select, use <Item #>.
      Returns:
        MenuItem representing the menu item.
      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: