Share this page

com.hp.lft.sdk.sap.gui

## Interface ComboBox

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

      public interface ComboBox
      extends Element

  A combo box in a SAP GUI for Windows application.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getAttachedText()` Returns the static text attached to the combo box.
    `ComboBoxItem` | `getItem(java.lang.String itemText)` Returns the item specified by the item text.
    `java.util.List<ComboBoxItem>` | `getItems()` Returns the list of the items in the combo box.
    `ComboBoxItem` | `getSelectedItem()` Returns the selected item.
    `boolean` | `isEnabled()` Indicates whether the combo box can accept user input.
    `void` | `select(ComboBoxItem item)` Selects the item from the combo box list.
    `void` | `select(int itemIndex)` Selects the specified item by index.
    `void` | `select(java.lang.String itemText)` Selects the specified item by text.
    `void` | `selectKey(java.lang.String itemKey)` Selects the SAP shortcut key representing an item in the combo box list.
    `void` | `setFocus()` Sets focus on the combo box.

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

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

      `waitUntilEnabled, waitUntilEnabled`

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

      `isEnabled`

- - ### Method Detail

    - #### isEnabled

          boolean isEnabled()
                     throws GeneralLeanFtException

      Indicates whether the combo box can accept user input.
      Returns:
        true if enabled.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getAttachedText

          java.lang.String getAttachedText()
                                    throws GeneralLeanFtException

      Returns the static text attached to the combo box.
      Returns:
        the static text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getItems

          java.util.List<ComboBoxItem> getItems()
                                         throws GeneralLeanFtException

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

    - #### getSelectedItem

                                                      ComboBoxItem getSelectedItem()
                                throws GeneralLeanFtException

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

    - #### getItem

                                                      ComboBoxItem getItem(java.lang.String itemText)
                        throws GeneralLeanFtException

      Returns the item specified by the item text.
      Parameters:
        `itemText` - the text of the item.
      Returns:
        the item specified by the item text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

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

      Selects the specified item by text.
      Parameters:
        `itemText` - the text of the item to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(int itemIndex)
               throws GeneralLeanFtException

      Selects the specified item by index.
      Parameters:
        `itemIndex` - 1-based.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(ComboBoxItem item)
               throws GeneralLeanFtException

      Selects the item from the combo box list.
      Parameters:
        `item` - the item to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### selectKey

          void selectKey(java.lang.String itemKey)
                  throws GeneralLeanFtException

      Selects the SAP shortcut key representing an item in the combo box list.
      Parameters:
        `itemKey` - the SAP shortcut key.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setFocus

          void setFocus()
                 throws GeneralLeanFtException

      Sets focus on 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: