Share this page

com.hp.lft.sdk.web

## Class ListBoxDescription

- java.lang.Object
- - com.hp.lft.sdk.internal.PropertiesDescriptionBase
  - - com.hp.lft.sdk.PropertiesDescription
    - - com.hp.lft.sdk.DescriptionBase
      - - com.hp.lft.sdk.web.WebBaseDescription
        - - com.hp.lft.sdk.web.WebElementDescription
          - - com.hp.lft.sdk.web.FormFieldDescription
            - - com.hp.lft.sdk.web.ListBoxDescription

- All Implemented Interfaces:
    CloneableObject, Description, com.hp.lft.sdk.internal.DescriptionWithVri, java.lang.Cloneable
  Direct Known Subclasses:
    ListBoxDescription

      public class ListBoxDescription
      extends FormFieldDescription

  The description of a Web ListBox test object.

- - ### Nested Class Summary

    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ListBoxDescription.Builder` This class can be used to construct an instance of the ListBoxDescription class using the builder pattern.
    `protected static class` | `ListBoxDescription.Init<T extends ListBoxDescription.Init<T>>` Helper class for ListBoxDescription.Builder.

  - ### Field Summary

    - ### Fields inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

      `properties`

  - ### Constructor Summary

    Modifier | Constructor and Description
    --- | ---
    `` | `ListBoxDescription()` Initializes a new instance of the ListBoxDescription class.
    `protected` | `ListBoxDescription(ListBoxDescription.Init<?> init)` Initializes a new instance of the ListBoxDescription class using the Builder pattern.

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `StringProperty` | `getDefaultValue()` Returns the initial text value, which is set when the object is reset.
    `StringProperty` | `getFirstItem()` Returns the first item in the list of items in the list.
    `java.lang.String[]` | `getItems()` Returns the collection of items in the list.
    `java.lang.Integer` | `getItemsCount()` Returns the number of items in the list.
    `java.lang.String[]` | `getSelectedItems()` Returns the collection of selected items in the list.
    `StringProperty` | `getValue()` Returns the object's current text.
    `java.lang.Integer` | `getVisibleItemsCount()` Returns the number of items that are displayed in the list box.
    `java.lang.Boolean` | `isEnabled()` Indicates whether the check box is enabled. Supported on UFT Developer versions 15.0.1 and later
    `java.lang.Boolean` | `isMultiple()` Indicates whether the user can select multiple items.
    `void` | `setDefaultValue(java.lang.String defaultValue)` Sets the initial text value, which is set when the object is reset.
    `void` | `setDefaultValue(StringProperty defaultValue)` Sets the initial text value, which is set when the object is reset.
    `void` | `setEnabled(java.lang.Boolean isEnabled)` Sets whether the list box is enabled. Supported on UFT Developer versions 15.0.1 and later
    `void` | `setFirstItem(java.lang.String firstItem)` Sets the first item in the list of items in the list.
    `void` | `setFirstItem(StringProperty firstItem)` Sets the first item in the list of items in the list.
    `void` | `setItems(java.lang.String[] items)` Sets the items in the list.
    `void` | `setItemsCount(java.lang.Integer count)` Sets the number of items in the list.
    `void` | `setMultiple(java.lang.Boolean isMultiple)` Sets whether the user can select multiple items.
    `void` | `setSelectedItems(java.lang.String[] items)` Sets the selected items in the list.
    `void` | `setValue(java.lang.String value)` Sets the current text in the edit field.
    `void` | `setValue(StringProperty value)` Sets the current text in the edit field.
    `void` | `setVisibleItemsCount(java.lang.Integer visibleItemsCount)` Sets the number of items that are displayed in the list box.

    - ### Methods inherited from class com.hp.lft.sdk.web.FormFieldDescription

      `getType, setType, setType`

    - ### Methods inherited from class com.hp.lft.sdk.web.WebElementDescription

      `getAccessibilityName, getCSSSelector, getRole, getXPath, setAccessibilityName, setAccessibilityName, setCSSSelector, setCSSSelector, setRole, setRole, setXPath, setXPath`

    - ### Methods inherited from class com.hp.lft.sdk.web.WebBaseDescription

      `cloneTo, getAbsoluteLocation, getAttributes, getClassName, getId, getInnerHTML, getInnerText, getLocation, getName, getOuterHTML, getOuterText, getSize, getStyles, getTagName, getTitle, isVisible, setAbsoluteLocation, setAbsoluteLocation, setAbsoluteLocation, setAttributes, setClassName, setClassName, setId, setId, setInnerHTML, setInnerHTML, setInnerText, setInnerText, setLocation, setLocation, setLocation, setName, setName, setOuterHTML, setOuterHTML, setOuterText, setOuterText, setSize, setSize, setSize, setStyles, setTagName, setTagName, setTitle, setTitle, setVisible`

    - ### Methods inherited from class com.hp.lft.sdk.DescriptionBase

      `getIndex, getIndexType, getVRI, setIndex, setIndexType, setVRI, setVRI`

    - ### Methods inherited from class com.hp.lft.sdk.PropertiesDescription

      `clone`

    - ### Methods inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

      `getValueAs, getValueAsStringProperty, insertValue`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

      `clone`

- - ### Constructor Detail

    - #### ListBoxDescription

          public ListBoxDescription()

      Initializes a new instance of the ListBoxDescription class.

    - #### ListBoxDescription

          protected ListBoxDescription(ListBoxDescription.Init<?> init)

      Initializes a new instance of the ListBoxDescription class using the Builder pattern.
      Parameters:
        `init` - the Builder pattern.

  - ### Method Detail

    - #### setValue

          public void setValue(StringProperty value)

      Sets the current text in the edit field.
      Parameters:
        `value` - a StringProperty (or RegExpProperty) representing the current text in the edit field.

    - #### setValue

          public void setValue(java.lang.String value)

      Sets the current text in the edit field.
      Parameters:
        `value` - the current text in the edit field.

    - #### getValue

          public StringProperty getValue()

      Returns the object's current text.
      Returns:
        the object's current text.

    - #### setDefaultValue

          public void setDefaultValue(StringProperty defaultValue)

      Sets the initial text value, which is set when the object is reset.
      Parameters:
        `defaultValue` - a StringProperty (or RegExpProperty) representing the initial text value, which is set when the object is reset.

    - #### setDefaultValue

          public void setDefaultValue(java.lang.String defaultValue)

      Sets the initial text value, which is set when the object is reset.
      Parameters:
        `defaultValue` - the initial text value, which is set when the object is reset.

    - #### getDefaultValue

          public StringProperty getDefaultValue()

      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.

    - #### setEnabled

      Supported on UFT Developer versions 15.0.1 and later

          public void setEnabled(java.lang.Boolean isEnabled)

      Sets whether the list box is enabled.
      Parameters:
        `isEnabled` - true if the list box is enabled.

    - #### isEnabled

      Supported on UFT Developer versions 15.0.1 and later

          public java.lang.Boolean isEnabled()

      Indicates whether the list box is enabled.
      Returns:
        true if enabled.

    - #### setMultiple

          public void setMultiple(java.lang.Boolean isMultiple)

      Sets whether the user can select multiple items.
      Parameters:
        `isMultiple` - true if the user can select multiple items.

    - #### isMultiple

          public java.lang.Boolean isMultiple()

      Indicates whether the user can select multiple items.
      Returns:
        true if the user can select multiple items.

    - #### setVisibleItemsCount

          public void setVisibleItemsCount(java.lang.Integer visibleItemsCount)

      Sets the number of items that are displayed in the list box.
      Parameters:
        `visibleItemsCount` - the number of items that are displayed in the list box.

    - #### getVisibleItemsCount

          public java.lang.Integer getVisibleItemsCount()

      Returns the number of items that are displayed in the list box.
      Returns:
        the number of items that are displayed in the list box.

    - #### setItems

          public void setItems(java.lang.String[] items)

      Sets the items in the list.
      Parameters:
        `items` - the items in the list.

    - #### getItems

          public java.lang.String[] getItems()

      Returns the collection of items in the list.

      Note: When weblist items are loaded dynamically, it is possible that only a partial list of the items will be returned.

      Returns:
        the collection of items in the list.

    - #### setSelectedItems

          public void setSelectedItems(java.lang.String[] items)

      Sets the selected items in the list.
      Parameters:
        `items` - the selected items in the list.

    - #### getSelectedItems

          public java.lang.String[] getSelectedItems()

      Returns the collection of selected items in the list.
      Returns:
        the collection of selected items in the list.

    - #### setItemsCount

          public void setItemsCount(java.lang.Integer count)

      Sets the number of items in the list.
      Parameters:
        `count` - the number of items in the list.

    - #### getItemsCount

          public java.lang.Integer getItemsCount()

      Returns the number of items in the list.
      Returns:
        the number of items in the list.

    - #### setFirstItem

          public void setFirstItem(StringProperty firstItem)

      Sets the first item in the list of items in the list.
      Parameters:
        `firstItem` - a StringProperty (or RegExpProperty) representing the first item in the list of items in the list.

    - #### setFirstItem

          public void setFirstItem(java.lang.String firstItem)

      Sets the first item in the list of items in the list.
      Parameters:
        `firstItem` - the first item in the list of items in the list.

    - #### getFirstItem

          public StringProperty getFirstItem()

      Returns the first item in the list of items in the list.
      Returns:
        the first item in the list of items in the list.

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: