Class NotificationLocator

java.lang.Object
com.vaadin.browserless.locator.Locator<Notification,NotificationLocator>
com.vaadin.flow.component.notification.NotificationLocator
All Implemented Interfaces:
Clickable<Notification>, HasThemeFilter<Notification,NotificationLocator>

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

    • NotificationLocator

      public NotificationLocator()
    • NotificationLocator

      public NotificationLocator(Notification component)
  • Method Details

    • getComponent

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

      public String getText()
      Gets the text of the notification. If the notification is not displayed an IllegalStateException will be thrown as the end user would not be able to see the contents. Javadoc copied from NotificationTester.getText().
      Returns:
      the text of the notification
      Throws:
      IllegalStateException - is notification is not displayed
    • autoClose

      public void autoClose()
      Simulates auto-close of the notification, because of show duration timeout. If notification is not displayed or auto-close is disabled setting duration to 0 or negative, an IllegalStateException is thrown. Javadoc copied from NotificationTester.autoClose().
      Throws:
      IllegalStateException - if the notification is not displayed or has auto-close disabled.