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