Class DefaultScreenshotProvider

  • All Implemented Interfaces:
    ScreenshotProvider

    public class DefaultScreenshotProvider
    extends java.lang.Object
    implements ScreenshotProvider
    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

      • DefaultScreenshotProvider

        public DefaultScreenshotProvider()
    • Method Detail

      • takeScreenshot

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