@vibe/testkit
Version:
Vibe e2e testing toolkit
41 lines • 1.44 kB
TypeScript
import { Page, Locator } from "@playwright/test";
import { ListItem } from "./ListItem";
import { BaseElement } from "./BaseElement";
/**
* Class representing a List element.
* Extends the BaseElement class.
*/
export declare class List extends BaseElement {
private items;
private itemsInitialized;
/**
* Create a List.
* @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);
/**
* Initialize list items if they are not already initialized.
* @returns {Promise<void>}
*/
initializeItemsIfNeeded(): Promise<void>;
/**
* Initialize the list items by locating all list elements.
* @returns {Promise<void>}
*/
initializeItems(): Promise<void>;
/**
* Get a list 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): ListItem | undefined;
/**
* Select a list item.
* @param {string} listItem - The name of the item to select.
* @returns {Promise<void>}
*/
selectItem(listItem: string): Promise<void>;
}
//# sourceMappingURL=List.d.ts.map