import { HoverOptions , hoverOnHandle } from '../../handle-actions' ; import { getHandleOf } from '../get-handle-of' ; import { Frame , Page } from 'playwright' ; export async function hoverOnSelector ( selector , page , options ) { if ( ! page ) { throw new Error ( `Cannot hover on '${ selector }' because no browser has been launched` ) ; } const handle = await getHandleOf ( selector , page , { ... options , throwOnTimeout : true , wrapPredicateExecutionInsideTryCatch : true , } ) ; await hoverOnHandle ( handle , selector , page , options ) ; }