Class RouterLinkLocator

java.lang.Object
com.vaadin.browserless.locator.Locator<RouterLink,RouterLinkLocator>
com.vaadin.flow.component.routerlink.RouterLinkLocator
All Implemented Interfaces:
Clickable<RouterLink>

@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor") public class RouterLinkLocator extends Locator<RouterLink,RouterLinkLocator> implements Clickable<RouterLink>
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 Details

    • RouterLinkLocator

      public RouterLinkLocator()
    • RouterLinkLocator

      public RouterLinkLocator(RouterLink component)
  • Method Details

    • getComponent

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

      public String getHref()
      Gets the URL that the router-link links to. Javadoc copied from RouterLinkTester.getHref().
      Returns:
      the href value, or empty string if no href has been set
    • getPath

      public String getPath()
      Gets the path for the router-link. Returns an empty String if there is no corresponding navigation target. Javadoc copied from RouterLinkTester.getPath().
      Returns:
      a String containing the navigation target path or empty if not present
    • getQueryParameters

      public QueryParameters getQueryParameters()
      Gets the query parameters for the router-link. Javadoc copied from RouterLinkTester.getQueryParameters().
      Returns:
      a
      invalid reference
      QueryParameters
      containing the navigation target's query parameters
    • getRoute

      public Optional<Class<? extends Component>> getRoute()
      Gets the registered route class for the router-link. Returns an empty optional if there is no corresponding navigation target. Javadoc copied from RouterLinkTester.getRoute().
      Returns:
      an
      invalid reference
      Optional
      containing the navigation target class or empty if not found
    • click

      public void click()
      Click the router-link for navigation. This is equivalent to calling navigate(). For cases where you need to access the navigated view, use navigate() instead as it returns the target view. Javadoc copied from RouterLinkTester.click().
      Specified by:
      click in interface Clickable<RouterLink>