tm-playwright-framework
Version:
Playwright Cucumber TS framework - The easiest way to learn
29 lines (28 loc) • 1.2 kB
TypeScript
/**
* CHECKBOX.TS
*
* This TypeScript file contains methods to perform actions related to the Check Box element.
*
* @author Govindharam, Sasitharan
* @reviewer Sahoo, AshokKumar
* @version 1.0 - 1st-JUNE-2025
*
* @methods
* - `check`: Accepts an element locator as a `string` or Element and selects the checkbox if it is not already selected. Ignores if already checked.
* - `uncheck`: Accepts an element locator as a `string` or Element and unselects the checkbox if it is selected. Ignores if already unchecked.
*/
export default class CheckboxActions {
constructor();
/**
* Selects the checkbox if it is not already selected. Ignores if already checked.
* @param locator - The element locator as a string or Element.
* @param timeOut - The optional timeout in milliseconds for the action.
*/
check(locator: any, timeOut?: number): Promise<void>;
/**
* Unselects the checkbox if it is selected. Ignores if already unchecked.
* @param locator - The element locator as a string or Element.
* @param timeOut - The optional timeout in milliseconds for the action.
*/
uncheck(locator: any, timeOut?: number): Promise<void>;
}