Share this page

com.hp.lft.sdk.sap.ui5

## Interface ListBox

- All Superinterfaces:
    Clickable, LocationInfoProvider, SupportDragAndDrop, SupportsNativeObject, TestObject, TestObjectDescriber, VisibleProvider, WaitUntilVisibleProvider, WebElement, WebTestObject, WebTestObjectDescriber, WaitUntilEnabledProvider, EnabledProvider

      public interface ListBox
      extends WebElement

  An SAPUI5 list box object.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `deselect(int... itemIndices)` Deselects items (by index) from the list.
    `void` | `deselect(ListItem... items)` Deselects a list of items in the list box.
    `void` | `deselect(java.lang.String... items)` Deselects items (by text) from the list.
    `void` | `extendSelect(int... itemIndices)` Selects a list of items in the list box.
    `void` | `extendSelect(ListItem... items)` Selects a list of items in the list box.
    `void` | `extendSelect(java.lang.String... items)` Selects a list of items in the list box.
    `void` | `filterByDate(java.util.Date date)` Invokes the filter according to the specified date.
    `ControlType` | `getControlType()` Returns the control type of the test object.
    `java.lang.String` | `getDefaultValue()` Returns the initial text value, which is set when the object is reset.
    `ListItem` | `getItem(java.lang.String text)` Returns an item with the given text.
    `java.util.List<ListItem>` | `getItems()` Returns all of the items in the list.
    `MobileListBehavior` | `getMobile()` Returns the functionality provided by `MobileListBehavior`.
    `java.util.List<ListItem>` | `getSelectedItems()` Returns the list of all selected items.
    `SelectType` | `getSelectType()` Returns the selection type of the list object.
    `java.lang.String` | `getType()` Returns the attribute "type" of the HTML element.
    `java.lang.String` | `getValue()` Returns this object's text value.
    `int` | `getVisibleItemsCount()` Returns the number of items that are displayed in the list box.
    `boolean` | `isEnabled()` Returns whether the list box is enabled.
    `boolean` | `isMultiple()` Returns whether multiple items can be selected.
    `void` | `select(int... itemIndices)` Selects a list of items according to their indices.
    `void` | `select(ListItem... items)` Selects a list of items in the list box.
    `void` | `select(java.lang.String... items)` Selects a list of items according to their string values.
    `void` | `set(java.lang.String text)` Enters the specified text in the list box.
    `void` | `singleSelect(int itemIndex)` Selects one item in the list box.
    `void` | `singleSelect(ListItem item)` Selects one item in the list box.
    `void` | `singleSelect(java.lang.String item)` Selects one item in the list box.

    - ### Methods inherited from interface com.hp.lft.sdk.web.WebElement

      `doubleClick, doubleClick, fireEvent, getAccessibilityName, getCSSSelector, getRole, getXPath, hoverTap, hoverTap, longPress, longPress, pan, pan, pinch, pinch, swipe, swipe`

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

      `click, click, click`

    - ### Methods inherited from interface com.hp.lft.sdk.web.WebTestObject

      `getAttribute, getAttributes, getClassName, getComputedStyle, getComputedStyles, getId, getInnerHTML, getInnerText, getName, getOuterHTML, getOuterText, getTagName, getTitle, isVisible`

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

      `getAbsoluteLocation, getLocation, getSize`

    - ### Methods inherited from interface com.hp.lft.sdk.web.WebTestObjectDescriber

      `describe, describe`

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

      `describe`

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

      `getNativeObject`

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

      `dragAndDropOn, dragAndDropOn`

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

      `waitUntilEnabled, waitUntilEnabled`

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

      `isEnabled`

- - ### Method Detail

    - #### getItems

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

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

    - #### getSelectedItems

          java.util.List<ListItem> getSelectedItems()
                                             throws GeneralLeanFtException

      Returns the list of all selected items.
      Returns:
        The list of of all selected items.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getSelectType

                                                      SelectType getSelectType()
                            throws GeneralLeanFtException

      Returns the selection type of the list object.
      Returns:
        selection type of the list object. Possible values: `SelectType`
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getControlType

                                                      ControlType getControlType()

      Returns the control type of the test object.
      Returns:
        The control type of the test object. Possible values: `ControlType`

    - #### getMobile

                                                      MobileListBehavior getMobile()

      Returns the functionality provided by `MobileListBehavior`.
      Returns:
        The functionality provided by `MobileListBehavior`.

    - #### set

          void set(java.lang.String text)
            throws GeneralLeanFtException

      Enters the specified text in the list box.
      Parameters:
        `text` - the text to enter.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### filterByDate

          void filterByDate(java.util.Date date)
                     throws GeneralLeanFtException

      Invokes the filter according to the specified date.
      Parameters:
        `date` - the date by which to filter.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isEnabled

          boolean isEnabled()
                     throws GeneralLeanFtException

      Returns whether the list box is enabled.
      Returns:
        True if enabled.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isMultiple

          boolean isMultiple()
                      throws GeneralLeanFtException

      Returns whether multiple items can be selected.
      Returns:
        True if multiple items can be selected.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(ListItem... items)
               throws GeneralLeanFtException

      Selects a list of items in the list box.
      Parameters:
        `items` - a collection of `ListItem` items to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

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

      Selects a list of items according to their string values.
      Parameters:
        `items` - a collection of items to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(int... itemIndices)
               throws GeneralLeanFtException

      Selects a list of items according to their indices.
      Parameters:
        `itemIndices` - the item indices to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### singleSelect

          void singleSelect(ListItem item)
                     throws GeneralLeanFtException

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

    - #### singleSelect

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

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

    - #### singleSelect

          void singleSelect(int itemIndex)
                     throws GeneralLeanFtException

      Selects one item in the list box.
      Parameters:
        `itemIndex` - the item index to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### extendSelect

          void extendSelect(ListItem... items)
                     throws GeneralLeanFtException

      Selects a list of items in the list box.
      Parameters:
        `items` - a collection of `ListItem` items to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### extendSelect

          void extendSelect(java.lang.String... items)
                     throws GeneralLeanFtException

      Selects a list of items in the list box.
      Parameters:
        `items` - a collection of items to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### extendSelect

          void extendSelect(int... itemIndices)
                     throws GeneralLeanFtException

      Selects a list of items in the list box.
      Parameters:
        `itemIndices` - a collection of item indices to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### deselect

          void deselect(ListItem... items)
                 throws GeneralLeanFtException

      Deselects a list of items in the list box.
      Parameters:
        `items` - a collection of `ListItem` items to deselect.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### deselect

          void deselect(java.lang.String... items)
                 throws GeneralLeanFtException

      Deselects items (by text) from the list.
      Parameters:
        `items` - the item names to deselect.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### deselect

          void deselect(int... itemIndices)
                 throws GeneralLeanFtException

      Deselects items (by index) from the list.
      Parameters:
        `itemIndices` - a collection of indices to deselect.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getItem

          ListItem getItem(java.lang.String text)

      Returns an item with the given text.
      Parameters:
        `text` - the text of the specified item.
      Returns:
        an item with the specified text.

    - #### getType

          java.lang.String getType()
          		throws GeneralLeanFtException

      Returns the attribute "type" of the HTML element.
      Returns:
        the attribute "type" of the HTML element.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getValue

          java.lang.String getValue()
          		throws GeneralLeanFtException

      Returns this object's text value.
      Returns:
        this object's text value.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getDefaultValue

          java.lang.String getDefaultValue()
          		throws GeneralLeanFtException

      Returns the initial text value, which is set when the object is reset.
      Returns:
        the initial text value, which is set when the object is reset.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getVisibleItemsCount

          int getVisibleItemsCount()
          	throws GeneralLeanFtException

      Returns the number of items that are displayed in the list box.
      Returns:
        the number of items that are displayed in the list 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: