playwright-fluent
Version:
Fluent API around playwright
13 lines (12 loc) • 487 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasHandleAriaLabel = void 0;
const get_attribute_of_handle_1 = require("../get-attribute-of-handle");
async function hasHandleAriaLabel(handle, expectedAriaLabel) {
if (!handle) {
return false;
}
const label = await (0, get_attribute_of_handle_1.getAttributeOfHandle)('aria-label', handle);
return label === expectedAriaLabel;
}
exports.hasHandleAriaLabel = hasHandleAriaLabel;
;