question: public BufferedImage takeScreenshot ( ) { Debug . setDebugLevel ( 3 ) ; File scrFile = driver . getScreenshotAs ( OutputType . FILE ) ; BufferedImage bufferedImage = null ; try { bufferedImage = ImageIO . read ( scrFile ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return bufferedImage ; }
target:  Convenience method that takes a screenshot of the device and returns a BufferedImage for further processing.