Class MenuBarSubMenuElement

java.lang.Object
com.vaadin.testbench.TestBenchElement
com.vaadin.flow.component.menubar.testbench.MenuBarSubMenuElement
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 MenuBarSubMenuElement extends TestBenchElement
A TestBench element representing a <vaadin-menu-bar-submenu> element.
  • Constructor Details

    • MenuBarSubMenuElement

      public MenuBarSubMenuElement()
  • Method Details

    • getMenuItems

      public List<MenuBarItemElement> getMenuItems()
      Get the items of this submenu.
      Returns:
      List of menu items.
    • getMenuItem

      public Optional<MenuBarItemElement> getMenuItem(String text)
      Get the first menu item matching the text.
      Returns:
      Optional menu item.
    • isOpen

      public boolean isOpen()
      Check if the submenu is open.
      Returns:
      true if submenu is open.
    • waitUntilClosed

      public void waitUntilClosed()
      Wait until the submenu is closed and its closing animation has finished.
      Throws:
      org.openqa.selenium.TimeoutException - if the submenu does not close