import { KeyboardHoldKey } from '../hold-down-key' ; import { toPage } from '../../../utils' ; import { Frame , Page } from 'playwright' ; export async function releaseKey ( key , page ) { if ( ! page ) { throw new Error ( `Cannot release key '${ key }' because no browser has been launched` ) ; } await toPage ( page ) . keyboard . up ( key ) ; }