UNPKG

@vibe/testkit

Version:
45 lines 1.66 kB
import { Page, Locator } from "@playwright/test"; import { BaseElement } from "./BaseElement"; import { Button } from "./Button"; /** * Class representing a ButtonGroup element. * Extends the BaseElement class. */ export declare class ButtonGroup extends BaseElement { /** * Create a ButtonGroup element. * @param {Page} page - The Playwright page object. * @param {Locator} locator - The locator for the ButtonGroup element. * @param {string} elementReportName - The name for reporting purposes. */ constructor(page: Page, locator: Locator, elementReportName: string); /** * Get all buttons. * @returns {Promise<Button[]>} An array of buttons. */ getAllButtons(): Promise<Button[]>; /** * Get a button by its name. * @param {string} buttonName - The name of the button to get. * @returns {Promise<Button>} The button object. */ getButtonByName(buttonName: string): Promise<Button>; /** * Click a button by its name. * @param {string} buttonName - The name of the button to click. * @returns {Promise<void>} */ clickButton(buttonName: string): Promise<void>; /** * Check if a button is selected. * @param {string} buttonName - The name of the button to check. * @returns {Promise<boolean>} True if the button is selected, false otherwise. */ isButtonSelected(buttonName: string): Promise<boolean>; /** * Get the name of the selected button. * @returns {Promise<string>} The name of the selected button. */ getSelectedButtonName(): Promise<string>; } //# sourceMappingURL=ButtonGroup.d.ts.map