import { report , waitUntil , WaitUntilOptions } from '../../../utils' ; import { doesNotExist } from '../../dom-actions' ; import { Frame , Page } from 'playwright' ; export async function selectorDoesNotExist ( selector , page , options ) { if ( ! page ) { throw new Error ( `Cannot check that '${ selector }' does not exist because no browser has been launched` ) ; } report ( 'waiting for the selector to disappear from DOM ...' , options . verbose ) ; await waitUntil ( ( ) => doesNotExist ( selector , page ) , `Selector '${ selector }' was found in DOM` , options ) ; const result = await doesNotExist ( selector , page ) ; return result ; }