import { ElementHandle } from 'playwright' ; export async function getAttributeOfHandle ( attributeName , selector ) { if ( ! selector ) { return null ; } const result = await selector . getAttribute ( attributeName ) ; return result ; }