import { ClickOptions , Point } from '../../handle-actions' ; import { Page } from 'playwright' ; export async function clickAtPosition ( position , page , options ) { if ( ! page ) { throw new Error ( `Cannot click at position 'x: ${ position . x }, y: ${ position . y }' because no browser has been launched` ) ; } await page . mouse . move ( position . x , position . y , { steps : 10 } ) ; await page . mouse . click ( position . x , position . y , options ) ; }