playwright-fluent
Version:
Fluent API around playwright
20 lines (19 loc) • 952 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.uncheckSelectorObject = void 0;
const utils_1 = require("../../../utils");
const handle_actions_1 = require("../../handle-actions");
async function uncheckSelectorObject(selector, page, options) {
if (!page) {
throw new Error(`Cannot uncheck '${selector.toString()}' because no browser has been launched`);
}
(0, utils_1.report)('waiting for the selector to appear in DOM ...', options.verbose);
await (0, utils_1.waitUntil)(() => selector.exists(), `Cannot uncheck '${selector.toString()}' because this selector was not found in DOM`, {
...options,
throwOnTimeout: true,
wrapPredicateExecutionInsideTryCatch: true,
});
const handle = await selector.getHandle();
await (0, handle_actions_1.uncheckHandle)(handle, selector.toString(), page, options);
}
exports.uncheckSelectorObject = uncheckSelectorObject;
;