Open topic with navigation

com.hp.lft.sdk.wpf

## Interface List

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

      public interface List
      extends UiObjectBase, TestObject

  A .NET WPF list object.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canSelectMultiple()` Indicates whether this list allows more than one child element to be selected at the same time.
    `void` | `deselect(int... itemIndices)` Deselects items from the list.
    `void` | `deselect(java.lang.String... items)` Deselects items from the list.
    `void` | `extendSelect(java.lang.String... items)` Selects additional items from the multi-selection list.
    `void` | `extendSelect(int... itemIndices)` Selects additional items from the multi-selection list.
    `java.lang.String` | `getHelpText()` Returns the help text associated with this object.
    `java.util.List<java.lang.String>` | `getItems()` Returns the list of items in the list object.
    `java.lang.String` | `getName()` Returns the name of this object.
    `java.lang.String` | `getParentText()` Returns the text associated with the parent object of this object.
    `java.util.List<java.lang.String>` | `getSelectedItems()` Returns the list of items that are selected in the list object.
    `void` | `select(int... itemIndices)` Selects multiple items by indices.
    `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(java.lang.String itemNameFrom, java.lang.String itemNameTo)` Selects list items between (and including) the two specified items. Note: Supported in LeanFT versions 14.51 and later.

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

    - #### canSelectMultiple

          boolean canSelectMultiple()
                             throws GeneralLeanFtException

      Indicates whether this list allows more than one child element to be selected at the same time.
      Returns:
        true if more than one child element can be selected
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getParentText

          java.lang.String getParentText()
                                  throws GeneralLeanFtException

      Returns the text associated with the parent object of this object.
      Returns:
        the text associated with the parent
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getName

          java.lang.String getName()
                            throws GeneralLeanFtException

      Returns the name of this object.
      Returns:
        the name
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getHelpText

          java.lang.String getHelpText()
                                throws GeneralLeanFtException

      Returns the help text associated with this object.
      Returns:
        the help text
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### extendSelect

          void extendSelect(int... itemIndices)
          										throws GeneralLeanFtException

      Selects additional items from the multi-selection list. This method is applicable only to lists that allow multiple selection.
      Parameters:
        `items` - the indices of 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. This method is applicable only to lists that allow multiple selection.
      Parameters:
        `items` - the names of the items to add to the selection.
      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(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 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 in the range
        `indexTo` - 0-based index of the last item of the range
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### selectRange

          void selectRange(java.lang.String itemNameFrom,
          	  	  java.lang.String itemNameTo)
          	throws GeneralLeanFtException

      Selects list items between (and including) the two specified items.
      Note: Supported in LeanFT versions 14.51 and later.
      Parameters:
        `itemNameFrom` - name of the first item in the range
        `itemNameTo` - name of the last item of the range
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getItems

          java.util.List<java.lang.String> 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<java.lang.String> 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.