import { ElementHandle } from 'playwright' ; export async function getValueOfHandle ( selector ) { if ( ! selector ) { return null ; } const result = await selector . evaluate ( ( el ) : string => { const inputElement = el as HTMLInputElement ; return inputElement && inputElement . value ; } ) ; return result ; }