Share this page

com.hp.lft.sdk.java

# Interface List

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

      public interface List
      extends UiObjectBase, TestObject

  A Java list box with single or multiple selection.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `activateItem(int itemIndex)` Activates an item in the list.
    `void` | `activateItem(ListItem item)` Activates an item in the list.
    `void` | `activateItem(java.lang.String item)` Activates an item in the list.
    `void` | `deselect(int... itemIndices)` Deselects items from the list.
    `void` | `deselect(ListItem... items)` Deselects items from the list.
    `void` | `deselect(java.lang.String... items)` Deselects items from the list.
    `void` | `deselectRange(int indexFrom, int indexTo)` Deselects list items between (and including) the two specified items.
    `void` | `extendSelect(int... itemIndices)` Selects additional items from the multi-selection list, by index.
    `void` | `extendSelect(ListItem... items)` Selects additional items from the multi-selection list, by ListItem items.
    `void` | `extendSelect(java.lang.String... items)` Selects additional items from the multi-selection list, by name.
    `ListItem` | `getItem(java.lang.String text)` Returns the item with the specified text.
    `java.util.List<ListItem>` | `getItems()` Returns the list of items in the list object.
    `java.util.List<ListItem>` | `getSelectedItems()` Returns the list of items that are selected in the list object.
    `void` | `select(int... itemIndices)` Selects multiple items by indices.
    `void` | `select(ListItem... items)` Selects multiple items by string values.
    `void` | `select(java.lang.String... items)` Selects multiple items by string values.
    `void` | `selectRange(int indexFrom, int indexTo)` Selects list items between (and including) the two specified items.
    `void` | `selectRange(ListItem itemFrom, ListItem itemTo)` Selects list items between (and including) the two specified items.
    `void` | `selectRange(String itemNameFirst, String itemNameLast)` Selects list items between (and including) the two specified items, by names.

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

      `createObject, createObject, fireEvent, getAttachedText, getBackgroundColor, getForegroundColor, getLabel, getNativeClass, getObjectName, getObjectProperty, getPath, getStatics, getTagName, isEnabled, isFocused, isVisible, sendKeys, sendKeys`

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

    - #### activateItem

          void activateItem(ListItem item)
                     throws GeneralLeanFtException

      Activates an item in the list.
      Parameters:
        `item` - the item to activate.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### activateItem

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

      Activates an item in the list.
      Parameters:
        `item` - the name of the item to activate.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### activateItem

          void activateItem(int itemIndex)
                     throws GeneralLeanFtException

      Activates an item in the list.
      Parameters:
        `itemIndex` - the 0-based index of the item to activate.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### deselect

          void deselect(ListItem... items)
                 throws GeneralLeanFtException

      Deselects items from the list.
      Parameters:
        `items` - the items to deselect.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### deselect

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

      Deselects items from the list.
      Parameters:
        `items` - the texts of the items to deselect.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### deselect

          void deselect(int... itemIndices)
                 throws GeneralLeanFtException

      Deselects items from the list.
      Parameters:
        `itemIndices` - 0-based indices of the items to deselect.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(ListItem... items)
               throws GeneralLeanFtException

      Selects multiple items by string values.
      Parameters:
        `items` - string values of the items to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

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

      Selects multiple items by string values.
      Parameters:
        `items` - string values of the items to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(int... itemIndices)
               throws GeneralLeanFtException

      Selects multiple items by indices.
      Parameters:
        `itemIndices` - the 0-based indices of the items to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### selectRange

          void selectRange(int indexFrom,
                           int indexTo)
                    throws GeneralLeanFtException

      Selects list items between (and including) the two specified items.
      Parameters:
        `indexFrom` - 0-based index of the first item.
        `indexTo` - 0-based index of the last item.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### selectRange

          void selectRange(ListItem itemFrom,
          		  ListItem itemTo)
                    throws GeneralLeanFtException

      Selects list items between (and including) the two specified items.
      Parameters:
        `indexFrom` - the first item to select.
        `indexTo` - the last item to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### selectRange

          void selectRange(java.lang.String itemNameFirst,
          		java.lang.String itemNameLast)
          	throws GeneralLeanFtException

      Selects list items between (and including) the two specified items, by names.
      Parameters:
        `itemNameFirst` - the name of the first item.
        `itemNameLast` - the name of the last item.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### deselectRange

          void deselectRange(int indexFrom,
                             int indexTo)
                      throws GeneralLeanFtException

      Deselects list items between (and including) the two specified items.
      Parameters:
        `indexFrom` - 0-based index of the first item.
        `indexTo` - 0-based index of the last item.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getItems

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

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

    - #### getSelectedItems

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

      Returns the list of items that are selected in the list object.
      Returns:
        the texts of the selected items.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### extendSelect

          void extendSelect(int... itemIndices)
          		throws GeneralLeanFtException

      Selects additional items from the multi-selection list, by index.
      Parameters:
        `items` - the indices of the items to add to the selection.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### extendSelect

          void extendSelect(ListItem... items)
          		throws GeneralLeanFtException

      Selects additional items from the multi-selection list, by ListItem.
      Parameters:
        `items` - the items to add to the selection.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### extendSelect

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

      Selects additional items from the multi-selection list, by name.
      Parameters:
        `items` - The names of the items to add to the selection.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getItem

          ListItem getItem(java.lang.String text)
                    throws GeneralLeanFtException

      Returns the item with the specified text.
      Parameters:
        `text` - the text.
      Returns:
        the item with the specified text.
      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: