tm-playwright-framework
Version:
Playwright Cucumber TS framework - The easiest way to learn
32 lines (31 loc) • 1.34 kB
TypeScript
/**
* RADIOBUTTON.TS
*
* This TypeScript file contains methods to perform actions on Radio Button (Options).
*
* @author Sasitharan, Govindharam
* @reviewer Sahoo, AshokKumar
* @version 1.0 - 1st-JUNE-2025
*
* @methods
* - `select`: Accepts an element locator as a `string` or Elemetn and selects the given option.
* - `selectByLabel`: Accepts an element locator as a `string` or Element and selects the option by the given label.
*/
export default class RadioButtonActions {
constructor();
/**
* Selects the given option for the specified radio button element.
* @param {any} locator - The element locator as a string or Element.
* @param {number} [timeOut=30000] - (Optional) The timeout in milliseconds to wait for the element to be visible.
* @returns {Promise<void>}
*/
select(locator: any, timeOut?: number): Promise<void>;
/**
* Selects the radio button option by the given label.
* @param {any} locator - The element locator as a string or Element.
* @param {string} labelValue - The label of the option to select.
* @param {number} [timeOut=30000] - (Optional) The timeout in milliseconds to wait for the element to be visible.
* @returns {Promise<void>}
*/
selectByLabel(locator: any, labelValue: string, timeOut?: number): Promise<void>;
}