playwright-fluent
Version:
Fluent API around playwright
17 lines (16 loc) • 567 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getHandlesWithRole = void 0;
const has_handle_role_1 = require("../has-handle-role");
async function getHandlesWithRole(text, handles) {
const result = [];
for (let index = 0; index < handles.length; index++) {
const handle = handles[index];
const hasRole = await (0, has_handle_role_1.hasHandleRole)(handle, text);
if (hasRole) {
result.push(handle);
}
}
return result;
}
exports.getHandlesWithRole = getHandlesWithRole;
;