Package de.otto.jlineup.file
Class FileService
java.lang.Object
de.otto.jlineup.file.FileService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateOrClearReportDirectory(boolean keepExisting) voidcreateOrClearScreenshotsDirectory(boolean keepExisting) voidstatic StringgenerateScreenshotFileNamePrefix(String url, String urlSubPath) getRecordedContext(int hash) readScreenshot(String fileName) voidsetBrowserAndVersion(ScreenshotContext screenshotContext, String browserAndVersion) voidvoidvoidvoidwriteHtmlReport(String htmlReport, String filename) voidwriteHtmlReportLegacy(String htmlReport) voidwriteJsonReport(String reportJson) writeScreenshot(ScreenshotContext screenshotContext, BufferedImage image, int yPosition)
-
Field Details
-
FILE_SEPARATOR
-
DIVIDER
- See Also:
-
PNG_EXTENSION
- See Also:
-
FILETRACKER_FILENAME
- See Also:
-
REPORT_HTML_FILENAME
- See Also:
-
LEGACY_REPORT_HTML_FILENAME
- See Also:
-
REPORT_JSON_FILENAME
- See Also:
-
-
Constructor Details
-
FileService
-
-
Method Details
-
getFileTracker
-
getRecordedContext
-
createOrClearReportDirectory
- Throws:
IOException
-
createWorkingDirectoryIfNotExists
- Throws:
IOException
-
createOrClearScreenshotsDirectory
- Throws:
IOException
-
generateScreenshotFileNamePrefix
-
readScreenshot
- Throws:
IOException
-
writeScreenshot
public String writeScreenshot(ScreenshotContext screenshotContext, BufferedImage image, int yPosition) throws IOException - Throws:
IOException
-
getRelativePathFromReportDirToScreenshotsDir
-
writeJsonReport
- Throws:
FileNotFoundException
-
writeHtmlReportLegacy
- Throws:
FileNotFoundException
-
writeHtmlReport
- Throws:
FileNotFoundException
-
writeHtml
- Throws:
FileNotFoundException
-
writeFileTrackerData
- Throws:
IOException
-
setBrowserAndVersion
-
getBrowsers
-
writeFileTrackerDataForScreenshotContextOnly
public void writeFileTrackerDataForScreenshotContextOnly(ScreenshotContext context) throws IOException - Throws:
IOException
-