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