Package io.fluentlenium.core
Class FluentDriverScreenshotPersister
java.lang.Object
io.fluentlenium.core.FluentDriverScreenshotPersister
Persists a screenshot to a target file.
-
Constructor Summary
ConstructorsConstructorDescriptionFluentDriverScreenshotPersister
(Configuration configuration, org.openqa.selenium.WebDriver driver) -
Method Summary
Modifier and TypeMethodDescriptionpersistScreenshot
(String fileName) Persists a screenshot to the argument target file using the screenshot path fromConfiguration
.
-
Constructor Details
-
FluentDriverScreenshotPersister
public FluentDriverScreenshotPersister(Configuration configuration, org.openqa.selenium.WebDriver driver)
-
-
Method Details
-
persistScreenshot
Persists a screenshot to the argument target file using the screenshot path fromConfiguration
.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
-