com.vaadin.flow.component.notification.testbench.

Class NotificationElement

java.lang.Object
com.vaadin.testbench.TestBenchElement
com.vaadin.flow.component.notification.testbench.NotificationElement

All Implemented Interfaces:

CanCompareScreenshots, HasCallFunction, HasDriver, HasElementQuery, HasPropertySettersGetters, HasSearchContext, HasTestBenchCommandExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement

public class NotificationElement extends TestBenchElement

A TestBench element representing a <vaadin-notification> element.

  • Constructor Details

    • NotificationElement

      public NotificationElement()
  • Method Details

    • isOpen

      public boolean isOpen()

      Checks whether the notification is shown.

      Returns:

      true if the notification is shown, false otherwise

    • getText

      public String getText()

      Specified by:

      getText in interface org.openqa.selenium.WebElement

      Overrides:

      getText in class TestBenchElement

    • getContext

      public org.openqa.selenium.SearchContext getContext()

      Description copied from class: TestBenchElement

      Returns this TestBenchElement cast to a SearchContext. Method provided for compatibility and consistency.

      Specified by:

      getContext in interface HasSearchContext

      Overrides:

      getContext in class TestBenchElement

      Returns:

      a SearchContext instance