@ Override public < X > X getScreenshotAs ( OutputType < X > target ) { // Get the screenshot as base64 and convert it to the requested type (i.e. OutputType<T>) String base64 = ( String ) execute ( DriverCommand . SCREENSHOT ) . getValue ( ) ; return target . convertFromBase64Png ( base64 ) ; }
Take screenshot of the current window .