@vibe/testkit
Version:
Vibe e2e testing toolkit
48 lines • 1.57 kB
TypeScript
import { Page, Locator } from "@playwright/test";
import { BaseElement } from "./BaseElement";
import { Menu } from "./Menu";
/**
* Class representing a SplitButton element.
* Extends the BaseElement class.
*/
export declare class SplitButton extends BaseElement {
private primaryButton;
private secondaryButton;
private menu;
/**
* Create a SplitButton element.
* @param {Page} page - The Playwright page object.
* @param {Locator} locator - The locator for the SplitButton element.
* @param {string} elementReportName - The name for reporting purposes.
*/
constructor(page: Page, locator: Locator, elementReportName: string, menu: Menu);
/**
* Select an item from the menu.
* @param {string} itemName - The name of the item to select.
* @returns {Promise<void>}
*/
selectItem(itemName: string): Promise<void>;
/**
* Open the secondary button menu.
*/
openMenu(): Promise<void>;
/**
* Close the secondary button menu.
*/
closeMenu(): Promise<void>;
/**
* Click the primary button.
*/
clickPrimaryButton(): Promise<void>;
/**
* Get the text of the primary button.
* @returns {Promise<string>} The text of the primary button.
*/
getPrimaryButtonText(): Promise<string>;
/**
* Check if the secondary button menu is expanded.
* @returns {Promise<boolean>} True if the secondary button menu is expanded, false otherwise.
*/
isMenuExpanded(): Promise<boolean>;
}
//# sourceMappingURL=SplitButton.d.ts.map