com.vaadin.flow.component.menubar.testbench.

Class MenuBarButtonElement

java.lang.Object
com.vaadin.testbench.TestBenchElement
com.vaadin.flow.component.menubar.testbench.MenuBarButtonElement

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 MenuBarButtonElement extends TestBenchElement

A TestBench element representing a <vaadin-menu-bar-button> element.

  • Constructor Details

    • MenuBarButtonElement

      public MenuBarButtonElement()
  • Method Details

    • getSubMenu

      public TestBenchElement getSubMenu()

      Get the sub menu overlay element linked to this menu button.

      Returns:

      TestBenchElement for the open sub menu.

    • getSubMenuItems

      public List<MenuBarItemElement> getSubMenuItems()

      Get TestBenchElements representing sub menu items under this button.

      Returns:

      List of MenuBarItemElement representing sub menu items.

    • isExpanded

      public boolean isExpanded()

      Check if the button has open sub menu.

      Returns:

      True if there is sub menu open