UNPKG

playwright-fluent

Version:
17 lines (16 loc) 620 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getHandlesWithAriaLabel = void 0; const has_handle_aria_label_1 = require("../has-handle-aria-label"); async function getHandlesWithAriaLabel(text, handles) { const result = []; for (let index = 0; index < handles.length; index++) { const handle = handles[index]; const hasAriaLabel = await (0, has_handle_aria_label_1.hasHandleAriaLabel)(handle, text); if (hasAriaLabel) { result.push(handle); } } return result; } exports.getHandlesWithAriaLabel = getHandlesWithAriaLabel;