code: public void takeScreenshot(String filename) throws IOException {
  		File screenshot = ((TakesScreenshot) driver)
  				.getScreenshotAs(OutputType.FILE);
  		FileUtils.copyFile(screenshot, new File(filename));
  	}
docs: Takes a screenshot of the current screen.
  
  @param filename
  the name of the file where the screenshot will be saved
  @throws IOException
  if something goes wrong while saving the screenshot