UNPKG

@vibe/testkit

Version:
57 lines 2.04 kB
import { Page, Locator } from "@playwright/test"; import { BaseElement } from "./BaseElement"; import { Tab } from "./Tab"; /** * Class representing a TabList element. * Extends the BaseElement class. */ export declare class TabList extends BaseElement { /** * Create a TabList element. * @param {Page} page - The Playwright page object. * @param {Locator} locator - The locator for the TabList element. * @param {string} elementReportName - The name for reporting purposes. */ constructor(page: Page, locator: Locator, elementReportName: string); /** * Get a tab by its name. * @param {string} tabName - The name of the tab to retrieve. * @returns {Promise<Tab>} The tab with the specified name. */ getTabByName(tabName: string): Promise<Tab>; /** * Get all tabs. * @returns {Promise<Tab[]>} An array of tabs. */ getAllTabs(): Promise<Tab[]>; /** * Get a tab by its index. * @param {number} index - The index of the tab to retrieve. * @returns {Promise<Tab>} The tab with the specified index. */ getTabByIndex(index: number): Promise<Tab>; /** * Select a tab by its name. * @param {string} tabName - The name of the tab to select. * @returns {Promise<void>} */ selectTab(tabName: string): Promise<void>; /** * Get the name of the selected tab. * @returns {Promise<string>} The name of the selected tab. */ getSelectedTabName(): Promise<string>; /** * Check if a tab is selected. * @param {string} tabName - The name of the tab to check. * @returns {Promise<boolean>} True if the tab is selected. */ isTabSelected(tabName: string): Promise<boolean>; /** * Get the name of a tab by its index. * @param {number} index - The index of the tab to retrieve. * @returns {Promise<string>} The name of the tab with the specified index. */ getTabNameByIndex(index: number): Promise<string>; } //# sourceMappingURL=TabList.d.ts.map