@vibe/testkit
Version:
Vibe e2e testing toolkit
52 lines • 1.89 kB
TypeScript
import { Locator, Page } from "@playwright/test";
import { BaseElement } from "./BaseElement";
import { ListItem } from "./ListItem";
/**
* Class representing a Combobox element.
* Extends the BaseElement class.
*/
export declare class Combobox extends BaseElement {
private searchField;
/**
* Create a Combobox element.
* @param {Page} page - The Playwright page object.
* @param {Locator} locator - The locator for the Combobox element.
* @param {string} elementReportName - The name for reporting purposes.
*/
constructor(page: Page, locator: Locator, elementReportName: string);
/**
* Get a combobox item by option.
* @param {string} option - The name of the option to get the combobox item for.
* @returns {Promise<ListItem>} The combobox item.
*/
getComboboxItemByOption(option: string): Promise<ListItem>;
/**
* Select an item from the combobox.
* @param {string} item - The name of the item to select.
* @returns {Promise<void>}
*/
selectItem(item: string): Promise<void>;
/**
* Search for an option in the combobox.
* @param {string} option - The name of the option to search for.
* @returns {Promise<void>}
*/
search(option: string): Promise<void>;
/**
* Clear the search.
* @returns {Promise<void>}
*/
clearSearch(): Promise<void>;
/**
* Get the search input value.
* @returns {Promise<string>} The search input value.
*/
getSearchInputValue(): Promise<string>;
/**
* Check if the search result is visible.
* @param {string} item - The name of the item to check if the search result is visible for.
* @returns {Promise<boolean>} True if the search result is visible, false otherwise.
*/
isSearchResultVisible(item: string): Promise<boolean>;
}
//# sourceMappingURL=Combobox.d.ts.map