e2ed
Version:
E2E testing framework over Playwright
18 lines (17 loc) • 564 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCheckedInputValue = void 0;
/**
* Get checked input value from multiselector (usually from `<input type="radio">`).
*/
const getCheckedInputValue = async (input) => {
const count = await input.count;
for (let index = 0; index < count; index += 1) {
const currentInput = input.nth(index);
if (await currentInput.checked) {
return currentInput.value;
}
}
return null;
};
exports.getCheckedInputValue = getCheckedInputValue;