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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclickItem(int index) Simulates a click on the item at the given position in the trail, navigating to its path.voidSimulates a click on the item that matches the given label, navigating to its path.voidEnsures the component is in a usable state before interaction.Gets the component being tested.Gets the labels of the breadcrumb items, in trail order.Methods inherited from class com.vaadin.browserless.locator.Locator
atIndex, component, components, exists, inside, inside, invalidate, self, with, withAttribute, withAttribute, withClassName, withCondition, withId, withoutAttribute, withoutAttribute, withoutClassName, withTestIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.browserless.Clickable
click, click, click, middleClick, middleClick, rightClick, rightClickMethods inherited from interface com.vaadin.browserless.locator.HasAriaLabelFilter
withAriaLabel, withAriaLabelContainingMethods inherited from interface com.vaadin.browserless.locator.HasThemeFilter
withoutTheme, withoutTheme, withTheme, withTheme
-
Constructor Details
-
BreadcrumbsLocator
public BreadcrumbsLocator() -
BreadcrumbsLocator
-
-
Method Details
-
getComponent
Description copied from interface:ClickableGets the component being tested.- Specified by:
getComponentin interfaceClickable<Breadcrumbs>- Returns:
- the component under test
-
ensureComponentIsUsable
public void ensureComponentIsUsable()Description copied from interface:ClickableEnsures the component is in a usable state before interaction.- Specified by:
ensureComponentIsUsablein interfaceClickable<Breadcrumbs>
-
getItemTexts
Gets the labels of the breadcrumb items, in trail order. Javadoc copied fromBreadcrumbsTester.getItemTexts().- Returns:
- the item labels
-
clickItem
Simulates a click on the item that matches the given label, navigating to its path. Javadoc copied fromBreadcrumbsTester.clickItem(java.lang.String).- Parameters:
text- the label of the breadcrumb item, not null- Throws:
IllegalArgumentException- if no item matches the labelIllegalStateException- 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 fromBreadcrumbsTester.clickItem(int).- Parameters:
index- the zero-based position of the item in the trail- Throws:
IllegalArgumentException- if there is no item at the given indexIllegalStateException- if the item has no path (e.g. the current-page item)
-