Class RangeInputLocator

java.lang.Object
com.vaadin.browserless.locator.Locator<com.vaadin.flow.component.html.RangeInput,RangeInputLocator>
com.vaadin.flow.component.html.RangeInputLocator
All Implemented Interfaces:
Clickable<com.vaadin.flow.component.html.RangeInput>, HasAriaLabelFilter<com.vaadin.flow.component.html.RangeInput,RangeInputLocator>, HasValueFilter<com.vaadin.flow.component.html.RangeInput,Double,RangeInputLocator>

@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor") public class RangeInputLocator extends Locator<com.vaadin.flow.component.html.RangeInput,RangeInputLocator> implements Clickable<com.vaadin.flow.component.html.RangeInput>, HasAriaLabelFilter<com.vaadin.flow.component.html.RangeInput,RangeInputLocator>, HasValueFilter<com.vaadin.flow.component.html.RangeInput,Double,RangeInputLocator>
Generated locator for RangeInput, derived from RangeInputTester. 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

    • RangeInputLocator

      public RangeInputLocator()
      Creates a locator that searches for a RangeInput.
    • RangeInputLocator

      public RangeInputLocator(com.vaadin.flow.component.html.RangeInput component)
      Creates a locator already bound to the given component, so that the action methods run against it instead of against a lookup.
      Parameters:
      component - the component the locator resolves to
  • Method Details

    • getComponent

      public com.vaadin.flow.component.html.RangeInput getComponent()
      Description copied from interface: Clickable
      Gets the component being tested.
      Specified by:
      getComponent in interface Clickable<com.vaadin.flow.component.html.RangeInput>
      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<com.vaadin.flow.component.html.RangeInput>
    • getValue

      public Double getValue()
      Get the current value of the component. Javadoc copied from RangeInputTester.getValue().
      Returns:
      current component value
      Throws:
      IllegalStateException - if component not visible
    • setValue

      public void setValue(Double 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.

      The value must be in the component min - max range, and should be valid according to the step scale factor, otherwise an IllegalArgumentException is thrown. Javadoc copied from RangeInputTester.setValue(java.lang.Double).

      Parameters:
      value - value to set
      Throws:
      IllegalStateException - if component is not interactable
      IllegalArgumentException - if the value is not valid based on min, max and step settings.
    • increase

      public void increase()
      Increase the value by the amount defined by component step.

      If the step is not defined, an IllegalStateException is thrown. An IllegalArgumentException is thrown if increase operation exceeds the max boundaries. Javadoc copied from RangeInputTester.increase().

      Throws:
      IllegalStateException - if component is not interactable or the step is not defined.
    • increase

      public void increase(int times)
      Increases the value by a specified multiple of the component step setting.

      If the step is not defined, an IllegalStateException is thrown. An IllegalArgumentException is thrown if increase operation exceeds the max boundaries. Javadoc copied from RangeInputTester.increase(int).

      Parameters:
      times - The number of times the component step value should be multiplied before adding to the component value. Must be a non-negative integer.
      Throws:
      IllegalArgumentException - If the times parameter is a negative integer.
      IllegalStateException - if component is not interactable or the step is not defined.
    • decrease

      public void decrease()
      Decreases the value by the amount defined by component step.

      If the step is not defined, an IllegalStateException is thrown. An IllegalArgumentException is thrown if increase operation exceeds the min boundaries. Javadoc copied from RangeInputTester.decrease().

      Throws:
      IllegalStateException - if component is not interactable or the step is not defined.
    • decrease

      public void decrease(int times)
      Decreases the value by a specified multiple of the component step setting.

      If the step is not defined, an IllegalStateException is thrown. An IllegalArgumentException is thrown if increase operation exceeds the min boundaries. Javadoc copied from RangeInputTester.decrease(int).

      Parameters:
      times - The number of times the component step value should be multiplied before subtracting from the component value. Must be a non-negative integer.
      Throws:
      IllegalArgumentException - If the times parameter is a negative integer.
      IllegalStateException - if component is not interactable or the step is not defined.