playwright-fluent
Version:
Fluent API around playwright
15 lines (14 loc) • 703 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasSelectorClass = void 0;
const get_handle_of_1 = require("../get-handle-of");
const has_handle_class_1 = require("../../handle-actions/has-handle-class");
async function hasSelectorClass(selector, expectedClass, page, options) {
if (!page) {
throw new Error(`Cannot check that '${selector}' has class '${expectedClass}' because no browser has been launched`);
}
const handle = await (0, get_handle_of_1.getHandleOf)(selector, page, options);
const result = await (0, has_handle_class_1.hasHandleClass)(handle, expectedClass);
return result;
}
exports.hasSelectorClass = hasSelectorClass;
;