UNPKG

@vibe/testkit

Version:
63 lines 2.08 kB
import { Page, Locator } from "@playwright/test"; import { BaseElement } from "./BaseElement"; import { ListItem } from "./ListItem"; /** * Class representing a Dropdown element. * Extends the BaseElement class. */ export declare class Dropdown extends BaseElement { private inputField; private clearSelectionIconButton; /** * Create a Dropdown element. * @param {Page} page - The Playwright page object. * @param {Locator} locator - The locator for the Dropdown element. * @param {string} elementReportName - The name for reporting purposes. */ constructor(page: Page, locator: Locator, elementReportName: string); /** * Get a dropdown item by item. * @param {string} item - The name of the item to get the dropdown item for. * @returns {Promise<ListItem>} The dropdown item. */ getDropdownItemByItem(item: string): Promise<ListItem>; /** * Check if the dropdown is open. * @returns {Promise<boolean>} True if the dropdown is open, false otherwise. */ isDropdownOpen(): Promise<boolean>; /** * Open the dropdown. * @returns {Promise<void>} */ open(): Promise<void>; /** * Close the dropdown. * @returns {Promise<void>} */ close(): Promise<void>; /** * Select an item from a dropdown. * @param {string} item - The value text to be selected in the dropdown. * @returns {Promise<void>} */ selectItem(item: string): Promise<void>; /** * Search for an item in the dropdown. * @param {string} item - The value text to be searched in the dropdown. * @returns {Promise<void>} */ search(item: string): Promise<void>; /** * Select multiple items from a dropdown. * @param items - The values text to be selected in the dropdown. * @returns {Promise<void>} */ selectMultipleItems(items: string[]): Promise<void>; /** * Clear the selection. * @returns {Promise<void>} */ clearSelection(): Promise<void>; } //# sourceMappingURL=Dropdown.d.ts.map