Share this page

com.hp.lft.sdk.stdwin

## Interface ComboBox

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

      public interface ComboBox
      extends UiObjectWithLayoutInfo, TestObject

  A standard Windows combo box.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.lang.String>` | `getItems()` Returns a list of strings containing the names of all items in the combo box.
    `java.lang.String` | `getSelectedItem()` Returns the selected item in the combo box.
    `void` | `open()` Opens the combo box.
    `void` | `select(int index)` Selects an item from the combo box based on a numerical index.
    `void` | `select(java.lang.String item)` Selects an item from the combo box based on a string.

    - ### Methods inherited from interface com.hp.lft.sdk.stdwin.UiObjectWithLayoutInfo

      `isRightAligned, isRightToLeftLayout, isRightToLeftReading`

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

      `getAccessibleName, getAttachedText, getText, getWindowClassRegExp, getWindowExtendedStyle, getWindowExtendedStyleAsLong, getWindowId, getWindowStyle, getWindowStyleAsLong`

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

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

      `waitUntilVisible, waitUntilVisible`

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

      `isVisible`

- - ### Method Detail

    - #### getItems

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

      Returns a list of strings containing the names of all items in the combo box.
      Returns:
        a list of strings containing the names of all items in the combo box.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getSelectedItem

          java.lang.String getSelectedItem()
                                    throws GeneralLeanFtException

      Returns the selected item in the combo box.
      Returns:
        the selected item in the combo box.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(int index)
               throws GeneralLeanFtException

      Selects an item from the combo box based on a numerical index.
      Parameters:
        `index` - numeric, 0-based, index of the item.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

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

      Selects an item from the combo box based on a string.
      Parameters:
        `item` - the item value.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### open

          void open()
             throws GeneralLeanFtException

      Opens the combo box.
      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: