code: public void takeScreenshot(String imageName) {
          if (browser.getName() == BrowserName.HTMLUNIT) {
              return;
          }
          try {
              // take a screenshot
              File srcFile;
              if (Property.isHubSet()) {
                  WebDriver augemented = new Augmenter().augment(driver);
                  srcFile = ((TakesScreenshot) augemented).getScreenshotAs(OutputType.FILE);
              } else {
                  srcFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
              }
              // now we need to save the file
              FileUtils.copyFile(srcFile, new File(imageName));
          } catch (Exception e) {
              log.error("IO Error taking screenshot: " + e);
          }
      }
docs: Takes a full screenshot of the entire page
  
  @param imageName - the name of the image typically generated via functions from
  TestOutput.generateImageName