Class ListBoxElement

java.lang.Object
com.vaadin.testbench.TestBenchElement
com.vaadin.flow.component.listbox.testbench.ListBoxElement
All Implemented Interfaces:
CanCompareScreenshots, HasCallFunction, HasDriver, HasElementQuery, HasLabel, HasPropertySettersGetters, HasSearchContext, HasSelectByText, HasTestBenchCommandExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement

public class ListBoxElement extends TestBenchElement implements HasLabel, HasSelectByText
A TestBench element representing a <vaadin-list-box> element.
  • Constructor Details

    • ListBoxElement

      public ListBoxElement()
  • Method Details

    • selectByText

      public void selectByText(String text)
      Description copied from interface: HasSelectByText
      Selects the first option matching the given text.
      Specified by:
      selectByText in interface HasSelectByText
      Parameters:
      text - the text of the option to select
    • getSelectedText

      public String getSelectedText()
      Description copied from interface: HasSelectByText
      Gets the text of the currently selected option.
      Specified by:
      getSelectedText in interface HasSelectByText
      Returns:
      the text of the current option
    • getOptions

      public List<String> getOptions()