Class FluentDriverScreenshotPersister

java.lang.Object
io.fluentlenium.core.FluentDriverScreenshotPersister

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

    • FluentDriverScreenshotPersister

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

    • persistScreenshot

      public File 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.

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