Class DefaultScreenshotGenerator

  • All Implemented Interfaces:
    ScreenshotGenerator

    public class DefaultScreenshotGenerator
    extends java.lang.Object
    implements ScreenshotGenerator
    Takes a simple screenshot in case of an error. Only the viewport of the browser is captured.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.image.BufferedImage takeScreenshot​(org.openqa.selenium.WebDriver webDriver)
      This method is called if an error occurred in the test.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultScreenshotGenerator

        public DefaultScreenshotGenerator()
    • Method Detail

      • takeScreenshot

        public java.awt.image.BufferedImage takeScreenshot​(org.openqa.selenium.WebDriver webDriver)
        Description copied from interface: ScreenshotGenerator
        This method is called if an error occurred in the test.
        Specified by:
        takeScreenshot in interface ScreenshotGenerator
        Parameters:
        webDriver - WebDriver to take the screenshot.
        Returns:
        the image which is safed to the surefire-reports folder