Class RouterLinkLocator
java.lang.Object
com.vaadin.browserless.locator.Locator<RouterLink,RouterLinkLocator>
com.vaadin.flow.component.routerlink.RouterLinkLocator
- All Implemented Interfaces:
Clickable<RouterLink>,HasTextFilter<RouterLink,RouterLinkLocator>
@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor")
public class RouterLinkLocator
extends Locator<RouterLink,RouterLinkLocator>
implements Clickable<RouterLink>, HasTextFilter<RouterLink,RouterLinkLocator>
Generated locator for
RouterLink, derived from
RouterLinkTester. 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 TypeMethodDescriptionvoidclick()Click the router-link for navigation.voidEnsures the component is in a usable state before interaction.Gets the component being tested.getHref()Gets the URL that the router-link links to.getPath()Gets the path for the router-link.Gets the query parameters for the router-link.getRoute()Gets the registered route class for the router-link.navigate()Navigate to the router-link target.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, middleClick, middleClick, rightClick, rightClickMethods inherited from interface com.vaadin.browserless.locator.HasTextFilter
withText, withTextContaining
-
Constructor Details
-
RouterLinkLocator
public RouterLinkLocator() -
RouterLinkLocator
-
-
Method Details
-
getComponent
Description copied from interface:ClickableGets the component being tested.- Specified by:
getComponentin interfaceClickable<RouterLink>- 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<RouterLink>
-
getHref
Gets the URL that the router-link links to. Javadoc copied fromRouterLinkTester.getHref().- Returns:
- the href value, or empty string if no href has been set
-
getPath
Gets the path for the router-link. Returns an emptyStringif there is no corresponding navigation target. Javadoc copied fromRouterLinkTester.getPath().- Returns:
- a
Stringcontaining the navigation target path or empty if not present
-
getQueryParameters
Gets the query parameters for the router-link. Javadoc copied fromRouterLinkTester.getQueryParameters().- Returns:
- a
containing the navigation target's query parameters
invalid reference
QueryParameters
-
getRoute
Gets the registered route class for the router-link. Returns an empty optional if there is no corresponding navigation target. Javadoc copied fromRouterLinkTester.getRoute().- Returns:
- an
containing the navigation target class or empty if not found
invalid reference
Optional
-
click
public void click()Click the router-link for navigation. This is equivalent to callingnavigate(). For cases where you need to access the navigated view, usenavigate()instead as it returns the target view. Javadoc copied fromRouterLinkTester.click().- Specified by:
clickin interfaceClickable<RouterLink>
-