Class FluentDriverScreenshotPersister

  • public class FluentDriverScreenshotPersister
    extends Object
    Persists a screenshot to a target file.
    • Constructor Detail

      • FluentDriverScreenshotPersister

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

      • persistScreenshot

        public void persistScreenshot​(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.

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