import { ElementHandle } from 'playwright' ; export async function scrollToHandle ( selector ) { if ( ! selector ) { return ; } await selector . evaluate ( ( el ) : void => { if ( el && typeof el . scrollIntoView === 'function' ) { el . scrollIntoView ( { block : 'center' , inline : 'center' } ) ; } } ) ; }