@vibe/testkit
Version:
Vibe e2e testing toolkit
36 lines • 1.3 kB
TypeScript
import { Page, Locator } from "@playwright/test";
import { MenuItem } from "./MenuItem";
import { BaseElement } from "./BaseElement";
/**
* Class representing a List element.
* Extends the BaseElement class.
*/
export declare class Menu extends BaseElement {
private items;
private itemsInitialized;
/**
* Create a Menu.
* @param {Page} page - The Playwright page object.
* @param {Locator} locator - The locator for the List element.
* @param {string} elementReportName - The name for reporting purposes.
*/
constructor(page: Page, locator: Locator, elementReportName: string);
/**
* Get all menu items.
* @returns {Promise<MenuItem[]>} An array of MenuItem objects.
*/
getAllMenuItems(): Promise<MenuItem[]>;
/**
* Get a menu item by its name.
* @param {string} itemName - The name of the item to retrieve.
* @returns {ListItem | undefined} The list item with the specified name or undefined if not found.
*/
getItemByName(itemName: string): Promise<MenuItem | undefined>;
/**
* Select a menu item.
* @param {string} listItem - The name of the item to select.
* @returns {Promise<void>}
*/
selectItem(listItem: string): Promise<void>;
}
//# sourceMappingURL=Menu.d.ts.map