Class FluentDriverScreenshotPersister


  • public class FluentDriverScreenshotPersister
    extends java.lang.Object
    Persists a screenshot to a target file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void persistScreenshot​(java.lang.String fileName)
      Persists a screenshot to the argument target file using the screenshot path from Configuration.
      • Methods inherited from class java.lang.Object

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

      • FluentDriverScreenshotPersister

        public FluentDriverScreenshotPersister​(Configuration configuration,
                                               org.openqa.selenium.WebDriver driver)
    • Method Detail

      • persistScreenshot

        public void persistScreenshot​(java.lang.String fileName)
        Persists a screenshot to the argument target file using the screenshot path from Configuration.

        If there is no screenshot path set in the configuration, the file will be the argument file name, otherwise the argument file name will be concatenated to the screenshot path to create the destination file.

        Parameters:
        fileName - the target file to save the screenshot to
        Throws:
        ScreenshotNotCreatedException - when an error occurs during taking the screenshot