Class MenuElement
java.lang.Object
org.vaadin.addons.dramafinder.element.VaadinElement
org.vaadin.addons.dramafinder.element.MenuElement
- All Implemented Interfaces:
Findable<ComponentQuery<MenuElement>>,HasAriaLabelElement,HasLocatorElement,HasStyleElement,HasThemeElement
public class MenuElement
extends VaadinElement
implements HasThemeElement, HasStyleElement, HasAriaLabelElement, Findable<ComponentQuery<MenuElement>>
PlaywrightElement for the menu overlay list
<vaadin-menu-bar-list-box>.
The list opens in an overlay at the page root; find(page, MenuElement.class)
finds it there once the menu is open.
-
Field Summary
FieldsFields inherited from class org.vaadin.addons.dramafinder.element.VaadinElement
locator -
Constructor Summary
ConstructorsConstructorDescriptionMenuElement(com.microsoft.playwright.Locator locator) Create aMenuElementfrom an existing locator.MenuElement(com.microsoft.playwright.Page page) Create aMenuElementfrom the page. -
Method Summary
Modifier and TypeMethodDescriptionstatic MenuElementgetByLabel(com.microsoft.playwright.Page page, String label) Deprecated, for removal: This API element is subject to removal in a future version.static MenuElementgetByLabelContaining(com.microsoft.playwright.Page page, String text) Deprecated, for removal: This API element is subject to removal in a future version.AMenuElementhas no visible label: this matches its accessible name.getMenuItemElement(String name) Get a menu item by its visible label within this menu.openSubMenu(String name) Click a menu item to open its submenu and return the next overlay.Methods inherited from class org.vaadin.addons.dramafinder.element.VaadinElement
assertHidden, assertVisible, assertVisible, click, find, getLocator, getProperty, getText, isHidden, isVisible, isVisible, setPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.vaadin.addons.dramafinder.element.shared.HasAriaLabelElement
assertAriaLabel, getAriaLabel, getAriaLabelLocatorMethods inherited from interface org.vaadin.addons.dramafinder.element.shared.HasLocatorElement
getLocator, waitAfterAction, waitForVaadinIdleMethods inherited from interface org.vaadin.addons.dramafinder.element.shared.HasStyleElement
assertCssClass, getCssClassMethods inherited from interface org.vaadin.addons.dramafinder.element.shared.HasThemeElement
assertHasNoThemeVariant, assertHasThemeVariant, assertTheme, getTheme
-
Field Details
-
FIELD_TAG_NAME
- See Also:
-
-
Constructor Details
-
MenuElement
public MenuElement(com.microsoft.playwright.Page page) Create aMenuElementfrom the page. -
MenuElement
public MenuElement(com.microsoft.playwright.Locator locator) Create aMenuElementfrom an existing locator.
-
-
Method Details
-
getMenuItemElement
Get a menu item by its visible label within this menu. -
openSubMenu
Click a menu item to open its submenu and return the next overlay. -
getByLabel
@Deprecated(since="2.0.0", forRemoval=true) public static MenuElement getByLabel(com.microsoft.playwright.Page page, String label) Deprecated, for removal: This API element is subject to removal in a future version.AMenuElementhas no visible label: this matches its accessible name. Usefind(page, MenuElement.class).withAccessibleName(..)instead. To be removed in 3.0.Get theMenuElementby its accessible name (ARIA rolemenu), searching the entire page.The name must match in full, case-sensitively, and no
.first()is applied: two matching components fail with a strict-mode error. UsegetByLabelContaining(Page, String)to match part of the name.- Parameters:
page- the Playwright pagelabel- the full accessible name- Returns:
- the matching
MenuElement
-
getByLabelContaining
@Deprecated(since="2.0.0", forRemoval=true) public static MenuElement getByLabelContaining(com.microsoft.playwright.Page page, String text) Deprecated, for removal: This API element is subject to removal in a future version.AMenuElementhas no visible label: this matches its accessible name. Usefind(page, MenuElement.class).withAccessibleNameContaining(..)instead. To be removed in 3.0.Get theMenuElementwhose accessible name (ARIA rolemenu) containstext, searching the entire page.The name is matched case-insensitively as a substring. No
.first()is applied: several matching components fail with a strict-mode error.- Parameters:
page- the Playwright pagetext- part of the accessible name- Returns:
- the matching
MenuElement
-
MenuElementhas no visible label: this matches its accessible name.