Class InputLocator

java.lang.Object
com.vaadin.browserless.locator.Locator<Input,InputLocator>
com.vaadin.flow.component.html.InputLocator
All Implemented Interfaces:
Clickable<Input>, HasAriaLabelFilter<Input,InputLocator>, HasPlaceholderFilter<Input,InputLocator>, HasValueFilter<Input,String,InputLocator>

@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor") public class InputLocator extends Locator<Input,InputLocator> implements Clickable<Input>, HasAriaLabelFilter<Input,InputLocator>, HasPlaceholderFilter<Input,InputLocator>, HasValueFilter<Input,String,InputLocator>
Generated locator for Input, derived from InputTester. 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

    • InputLocator

      public InputLocator()
    • InputLocator

      public InputLocator(Input component)
  • Method Details

    • getComponent

      public Input getComponent()
      Description copied from interface: Clickable
      Gets the component being tested.
      Specified by:
      getComponent in interface Clickable<Input>
      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<Input>
    • 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 InputTester.setValue(java.lang.String).

      Parameters:
      value - value to set
    • getValue

      public String getValue()
      Get the current value of the component. Javadoc copied from InputTester.getValue().
      Returns:
      current component value
      Throws:
      IllegalStateException - if component not visible
    • clear

      public void clear()
      Empties the field, as when the user deletes its contents (or clicks the clear button, where one is shown).

      Emptying is something the user can always do, so it needs no clear button: a field may legitimately end up invalid ? a required field, for instance ? once emptied. Javadoc copied from InputTester.clear().

      Throws:
      IllegalStateException - if the component is not usable