@vibe/testkit
Version:
Vibe e2e testing toolkit
38 lines • 1.2 kB
TypeScript
import { Page, Locator } from "@playwright/test";
import { BaseElement } from "./BaseElement";
/**
* Class representing a Checkbox element.
* Extends the BaseElement class.
*/
export declare class Checkbox extends BaseElement {
private checkbox;
private label;
/**
* Create a Checkbox element.
* @param {Page} page - The Playwright page object.
* @param {Locator} locator - The locator for the Checkbox element.
* @param {string} elementReportName - The name for reporting purposes.
*/
constructor(page: Page, locator: Locator, elementReportName: string);
/**
* Set the checkbox to checked.
* @returns {Promise<void>}
*/
setChecked(): Promise<void>;
/**
* Set the checkbox to unchecked.
* @returns {Promise<void>}
*/
setUnchecked(): Promise<void>;
/**
* Check if the checkbox is checked.
* @returns {Promise<boolean>} True if the checkbox is checked, false otherwise.
*/
isChecked(): Promise<boolean>;
/**
* Get the label of the checkbox.
* @returns {Promise<string>} The label of the checkbox.
*/
getLabel(): Promise<string>;
}
//# sourceMappingURL=Checkbox.d.ts.map