Interface ListBox

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

public interface ListBox extends WebElement, WaitUntilEnabledProvider
A Web drop-down box or multiple selection list.
HTML example:
<select name="select">
<option value="value1"> Value 1</option>
<option value="value2" selected> Value 2</option>
<option value="value3> Value 3</option>
</select>
  • Method Details

    • getValue

      String getValue() throws GeneralLeanFtException
      Returns this object's text value.
      Returns:
      this object's text value.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • getDefaultValue

      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 error occurs during execution
    • isMultiple

      boolean isMultiple() throws GeneralLeanFtException
      Indicates whether the user can select multiple items.
      Returns:
      true, if the user can select multiple items.
      Throws:
      GeneralLeanFtException - if 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 error occurs during execution
    • getItems

      Returns all of the items in the list.
      Returns:
      all of the items in the list.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • getSelectedItems

      List<ListItem> getSelectedItems() throws GeneralLeanFtException
      Returns a collection of all selected items.
      Returns:
      a collection of all selected items.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • extendSelect

      void extendSelect(String... items) throws GeneralLeanFtException
      Selects additional items from the multi-selection list, by name.
      Parameters:
      items - the texts of the items to add to the selection.
      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:
      itemIndices - 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 item.
      Parameters:
      items - the items to add to the selection.
      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 - the items to select.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • select

      void select(String... items) throws GeneralLeanFtException
      Selects items in the list based on the item names.
      Parameters:
      items - the texts of the items to select.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • select

      void select(int... itemIndices) throws GeneralLeanFtException
      Selects items in the list based on the item indices.
      Parameters:
      itemIndices - the item indices to select.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • deselect

      void deselect(ListItem... items) throws GeneralLeanFtException
      Deselects a list of items in the list box.
      Parameters:
      items - the items to deselect.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • deselect

      void deselect(String... items) throws GeneralLeanFtException
      Deselects items in the list based on the item names.
      Parameters:
      items - the texts of the items to deselect.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • deselect

      void deselect(int... itemIndices) throws GeneralLeanFtException
      Deselects items in the list based on the item indices.
      Parameters:
      itemIndices - the indices of the items to deselect.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • getItem

      ListItem getItem(String text)
      Returns an item with the given text.
      Parameters:
      text - the text of this item.
      Returns:
      an item with the given text.
    • getType

      String getType() throws GeneralLeanFtException
      Returns the attribute "type" of the HTML element.
      Returns:
      the attribute "type" of the HTML element.
      Throws:
      GeneralLeanFtException - if error occurs during execution