UNPKG

playwright-fluent

Version:
13 lines (12 loc) 531 B
"use strict"; 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;