import { getAttributeOfHandle } from '../get-attribute-of-handle' ; import { ElementHandle } from 'playwright' ; export async function hasHandleAttribute ( handle , attributeName , expectedAttributeValue ) { if ( ! handle ) { return false ; } const attributeValue = await getAttributeOfHandle ( attributeName , handle ) ; return attributeValue === expectedAttributeValue ; }