playwright-fluent
Version:
Fluent API around playwright
20 lines (19 loc) • 828 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSelectorNotVisible = void 0;
const get_handle_of_1 = require("../get-handle-of");
const utils_1 = require("../../../utils");
const handle_actions_1 = require("../../handle-actions");
async function isSelectorNotVisible(selector, page, options) {
if (!page) {
throw new Error(`Cannot get visibility status of '${selector}' because no browser has been launched`);
}
const waitOptions = {
...options,
...utils_1.noWaitNoThrowOptions,
};
const handle = await (0, get_handle_of_1.getHandleOf)(selector, page, waitOptions);
const result = await (0, handle_actions_1.isHandleNotVisible)(handle, { verbose: options.verbose });
return result;
}
exports.isSelectorNotVisible = isSelectorNotVisible;
;