Class MenuBarElement
java.lang.Object
com.vaadin.testbench.TestBenchElement
com.vaadin.flow.component.menubar.testbench.MenuBarElement
- 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
A TestBench element representing a
<vaadin-menu-bar>
element.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet all the open sub menu overlay elements.Gets the button elements wrapping the root level items.Gets the button which opens the sub menu of overflowing items, ornull
if the overflow button is not visible.Get the sub menu overlay element.Get TestBenchElements representing sub menu items under the first sub menu.getSubMenuItems
(TestBenchElement overlay) Get TestBenchElements representing sub menu items under specific sub menu.Methods inherited from class com.vaadin.testbench.TestBenchElement
callFunction, clear, click, click, compareScreen, compareScreen, compareScreen, contextClick, dispatchEvent, dispatchEvent, doubleClick, equals, executeScript, findElement, findElements, focus, getAttribute, getCapabilities, getClassNames, getCommandExecutor, getContext, getCssValue, getDriver, getLocation, getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, setProperty, setProperty, setProperty, setProperty, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.testbench.HasElementQuery
$, $
Methods inherited from interface org.openqa.selenium.WebElement
getAccessibleName, getAriaRole, getDomAttribute, getDomProperty, getShadowRoot
-
Field Details
-
OVERLAY_TAG
- See Also:
-
-
Constructor Details
-
MenuBarElement
public MenuBarElement()
-
-
Method Details
-
getButtons
Gets the button elements wrapping the root level items. This does not include the overflowing items which are rendered in a sub menu, nor the overflow button which opens the sub menu.- Returns:
- the button elements in the menu bar
-
getOverflowButton
Gets the button which opens the sub menu of overflowing items, ornull
if the overflow button is not visible.- Returns:
- the button which opens the sub menu of overflowing items
-
getSubMenuItems
Get TestBenchElements representing sub menu items under the first sub menu.- Returns:
- List of TestBenchElements representing sub menu items.
-
getSubMenuItems
Get TestBenchElements representing sub menu items under specific sub menu.- Parameters:
overlay
- The sub menu overlay from which items are being collected.- Returns:
- List of TestBenchElements representing sub menu items.
-
getSubMenu
Get the sub menu overlay element.- Returns:
- TestBenchElement for the first open sub menu.
-
getAllSubMenus
Get all the open sub menu overlay elements.- Returns:
- List of TestBenchElements representing currently open sub menus.
-