Class ListBox

  • All Implemented Interfaces:
    org.openqa.selenium.interactions.Locatable, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsDriver

    public class ListBox
    extends DesktopElement
    • Constructor Detail

      • ListBox

        public ListBox​(org.openqa.selenium.WebElement element)
    • Method Detail

      • items

        public List<ListBoxItem> items()
        Returns all the list box items
        Returns:
      • selectedItems

        public List<ListBoxItem> selectedItems()
        Gets all selected items.
        Returns:
      • selectedItem

        public ListBoxItem selectedItem()
        Gets the first selected item or null otherwise.
        Returns:
      • select

        public ListBoxItem select​(int index)
        Selects an item by index.
        Parameters:
        index -
        Returns:
      • select

        public ListBoxItem select​(String text)
        Selects an item by text.
        Parameters:
        text -
        Returns:
      • addToSelection

        public ListBoxItem addToSelection​(int index)
        Add a row to the selection by index.
        Parameters:
        index -
        Returns:
      • addToSelection

        public ListBoxItem addToSelection​(String text)
        Add a row to the selection by text.
        Parameters:
        text -
        Returns:
      • removeFromSelection

        public ListBoxItem removeFromSelection​(int index)
        Remove a row from the selection by index.
        Parameters:
        index -
        Returns:
      • removeFromSelection

        public ListBoxItem removeFromSelection​(String text)
        Remove a row from the selection by text.
        Parameters:
        text -
        Returns: