Class TextFieldLocator

java.lang.Object
com.vaadin.browserless.locator.Locator<TextField,TextFieldLocator>
com.vaadin.flow.component.textfield.TextFieldLocator
All Implemented Interfaces:
Clickable<TextField>, HasAriaLabelFilter<TextField,TextFieldLocator>, HasLabelFilter<TextField,TextFieldLocator>, HasThemeFilter<TextField,TextFieldLocator>, HasValueFilter<TextField,String,TextFieldLocator>

Generated locator for TextField, derived from TextFieldTester. Filter steps are inherited from Locator; action methods delegate to a fresh tester around the resolved component, so behavioral changes belong on the tester, not here.
  • Constructor Details

    • TextFieldLocator

      public TextFieldLocator()
    • TextFieldLocator

      public TextFieldLocator(TextField component)
  • Method Details

    • getComponent

      public TextField getComponent()
      Description copied from interface: Clickable
      Gets the component being tested.
      Specified by:
      getComponent in interface Clickable<TextField>
      Returns:
      the component under test
    • ensureComponentIsUsable

      public void ensureComponentIsUsable()
      Description copied from interface: Clickable
      Ensures the component is in a usable state before interaction.
      Specified by:
      ensureComponentIsUsable in interface Clickable<TextField>
    • setValue

      public void setValue(String value)
      Set the value to the component if it is usable. For a non interactable component an IllegalStateException will be thrown as the end user would not be able to set a value. Javadoc copied from TextFieldTester.setValue(java.lang.Object).
      Parameters:
      value - value to set
    • clear

      public void clear()
      Resets the value to the empty one, as when clicking on component clear button on the browser. An IllegalStateException is thrown if the clear button is not visible. Javadoc copied from TextFieldTester.clear().
      Throws:
      IllegalStateException - if the text field is not usable or the clear button is not visible.