Class CheckboxLocator

java.lang.Object
com.vaadin.browserless.locator.Locator<com.vaadin.flow.component.checkbox.Checkbox,CheckboxLocator>
com.vaadin.flow.component.checkbox.CheckboxLocator
All Implemented Interfaces:
Clickable<com.vaadin.flow.component.checkbox.Checkbox>, HasAriaLabelFilter<com.vaadin.flow.component.checkbox.Checkbox,CheckboxLocator>, HasLabelFilter<com.vaadin.flow.component.checkbox.Checkbox,CheckboxLocator>, HasThemeFilter<com.vaadin.flow.component.checkbox.Checkbox,CheckboxLocator>, HasValueFilter<com.vaadin.flow.component.checkbox.Checkbox,Boolean,CheckboxLocator>

@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor") public class CheckboxLocator extends Locator<com.vaadin.flow.component.checkbox.Checkbox,CheckboxLocator> implements Clickable<com.vaadin.flow.component.checkbox.Checkbox>, HasLabelFilter<com.vaadin.flow.component.checkbox.Checkbox,CheckboxLocator>, HasAriaLabelFilter<com.vaadin.flow.component.checkbox.Checkbox,CheckboxLocator>, HasValueFilter<com.vaadin.flow.component.checkbox.Checkbox,Boolean,CheckboxLocator>, HasThemeFilter<com.vaadin.flow.component.checkbox.Checkbox,CheckboxLocator>
Generated locator for Checkbox, derived from CheckboxTester. 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

    • CheckboxLocator

      public CheckboxLocator()
      Creates a locator that searches for a Checkbox.
    • CheckboxLocator

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

      public boolean isChecked()
      Checks whether the checkbox is currently checked. Javadoc copied from CheckboxTester.isChecked().
      Returns:
      true if the checkbox is checked, false otherwise
      Since:
      25.3
    • check

      public void check()
      Checks the checkbox by clicking it, as a user would.

      Does nothing if the checkbox is already checked, since a user would not click it in that case. The checkbox must be usable either way. Javadoc copied from CheckboxTester.check().

      Since:
      25.3
    • uncheck

      public void uncheck()
      Unchecks the checkbox by clicking it, as a user would.

      Does nothing if the checkbox is already unchecked, since a user would not click it in that case. The checkbox must be usable either way. Javadoc copied from CheckboxTester.uncheck().

      Since:
      25.3
    • click

      public void click(int button, MetaKeys metaKeys)
      Specified by:
      click in interface Clickable<com.vaadin.flow.component.checkbox.Checkbox>
      Parameters:
      button - the mouse button (0=left, 1=middle, 2=right)
      metaKeys - the meta keys pressed during click