Class FailureScreenshotTaker

java.lang.Object
org.fest.swing.junit.runner.FailureScreenshotTaker

public class FailureScreenshotTaker extends Object
Understands taking a screenshot of the desktop when a GUI test fails.
  • Field Details

    • logger

      private static Logger logger
    • imageFolder

      private final File imageFolder
    • screenshotTaker

      private final org.fest.swing.image.ScreenshotTaker screenshotTaker
  • Constructor Details

    • FailureScreenshotTaker

      public FailureScreenshotTaker(File imageFolder)
      Creates a new FailureScreenshotTaker.
      Parameters:
      imageFolder - the folder where screenshots will be saved to.
    • FailureScreenshotTaker

      FailureScreenshotTaker(File imageFolder, org.fest.swing.image.ScreenshotTaker screenshotTaker)
  • Method Details

    • saveScreenshot

      public void saveScreenshot(String failedTest)
      Saves a screenshot of the desktop using the given description as the file name.
      Parameters:
      failedTest - the description of the test failure.