import { FtrProviderContext } from '../ftr_provider_context' ; export function MachineLearningScreenshotsProvider ( { getService } ) { const ml = getService ( 'ml' ) ; const screenshot = getService ( 'screenshots' ) ; return { async takeScreenshot ( name , subDirectories ) { await screenshot . take ( `${ name }_new` , undefined , subDirectories ) ; } , async removeFocusFromElement ( ) { await ml . navigation . openKibanaNav ( ) ; await ml . navigation . closeKibanaNav ( ) ; } , } ; }