Class BreadcrumbsLocator

java.lang.Object
com.vaadin.browserless.locator.Locator<Breadcrumbs,BreadcrumbsLocator>
com.vaadin.flow.component.breadcrumbs.BreadcrumbsLocator
All Implemented Interfaces:
Clickable<Breadcrumbs>, HasAriaLabelFilter<Breadcrumbs,BreadcrumbsLocator>, HasThemeFilter<Breadcrumbs,BreadcrumbsLocator>

@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor") public class BreadcrumbsLocator extends Locator<Breadcrumbs,BreadcrumbsLocator> implements Clickable<Breadcrumbs>, HasAriaLabelFilter<Breadcrumbs,BreadcrumbsLocator>, HasThemeFilter<Breadcrumbs,BreadcrumbsLocator>
Generated locator for Breadcrumbs, derived from BreadcrumbsTester. 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

    • BreadcrumbsLocator

      public BreadcrumbsLocator()
    • BreadcrumbsLocator

      public BreadcrumbsLocator(Breadcrumbs component)
  • Method Details

    • getComponent

      public Breadcrumbs getComponent()
      Description copied from interface: Clickable
      Gets the component being tested.
      Specified by:
      getComponent in interface Clickable<Breadcrumbs>
      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<Breadcrumbs>
    • getItemTexts

      public List<String> getItemTexts()
      Gets the labels of the breadcrumb items, in trail order. Javadoc copied from BreadcrumbsTester.getItemTexts().
      Returns:
      the item labels
    • getItemPaths

      public List<String> getItemPaths()
      Gets the resolved navigation path (href) of each breadcrumb item, in trail order. An item that has no navigable path (such as the current-page item) is represented by null; note that null is distinct from an empty string, which is the path of the application root. Javadoc copied from BreadcrumbsTester.getItemPaths().
      Returns:
      the item paths, with null for items that have no path
    • clickItem

      public void clickItem(String text)
      Simulates a click on the item that matches the given label, navigating to its path. Javadoc copied from BreadcrumbsTester.clickItem(java.lang.String).
      Parameters:
      text - the label of the breadcrumb item, not null
      Throws:
      IllegalArgumentException - if no item matches the label
      IllegalStateException - if more than one item matches, or the item has no path (e.g. the current-page item)
    • clickItem

      public void clickItem(int index)
      Simulates a click on the item at the given position in the trail, navigating to its path. Javadoc copied from BreadcrumbsTester.clickItem(int).
      Parameters:
      index - the zero-based position of the item in the trail
      Throws:
      IllegalArgumentException - if there is no item at the given index
      IllegalStateException - if the item has no path (e.g. the current-page item)