Class HtmlComponentTester<T extends HtmlComponent>

java.lang.Object
com.vaadin.testbench.unit.ComponentTester<T>
com.vaadin.flow.component.html.testbench.HtmlComponentTester<T>
Direct Known Subclasses:
HrTester, HtmlContainerTester, NativeDetailsTester

public class HtmlComponentTester<T extends HtmlComponent> extends ComponentTester<T>
  • Constructor Details

    • HtmlComponentTester

      public HtmlComponentTester(T component)
      Wrap given component for testing.
      Parameters:
      component - target component
  • Method Details

    • getTitle

      public String getTitle()
      Get the title string set for the html component if available.
      Returns:
      title string
      Throws:
      IllegalStateException - if not title has been set
    • getText

      public String getText()
      Get the recursive text for target element.
      Returns:
      recursive text of component
      Throws:
      IllegalStateException - if component not visible