public class GifScreenshotWorker extends Object
| Constructor and Description |
|---|
GifScreenshotWorker(org.openqa.selenium.WebDriver driver) |
GifScreenshotWorker(org.openqa.selenium.WebDriver driver,
String rootDir,
String screenshotsFolder,
String generatedGIFsFolderName,
boolean loopContinuously) |
| Modifier and Type | Method and Description |
|---|---|
File |
createGif()
Creates the GIF and writes it on the disk
|
String |
getGeneratedGIFsFolderName()
Defaults to "project.dir/rootDir/uniqueId/generatedGifs"
|
String |
getRootDir() |
String |
getScreenshotsFolderName()
Defaults to "project.dir/rootDir/uniqueId/screenshots"
|
int |
getTimeBetweenFramesInMilliseconds()
Defaults to 500ms
|
String |
getUniqueName() |
boolean |
isLoopContinuously()
Defaults to false
|
void |
setGeneratedGIFsFolderName(String generatedGIFsFolderName)
Set location where generated GIFs will be stored on disk
|
void |
setLoopContinuously(boolean loopContinuously)
Set weather the generated GIF will loop
|
void |
setRootDir(String rootDir)
Folder on disk where screenshots and generated GIFs will be stored
Defaults to "project.dir/gifScreenshotsFolder/uniqueId/"
|
void |
setScreenshotsFolderName(String screenshotsFolderName)
Set location where screenshots will be stored on disk
|
void |
setTimeBetweenFramesInMilliseconds(int timeBetweenFramesInMilliseconds)
Set the delay used to switch from one image to another on thegenerated GIV
|
void |
takeScreenshot()
Takes a screenshot of the current page
|
public GifScreenshotWorker(org.openqa.selenium.WebDriver driver)
public void takeScreenshot()
public File createGif()
File, null when the gif could not be generated due to lack of screenshotspublic int getTimeBetweenFramesInMilliseconds()
public void setTimeBetweenFramesInMilliseconds(int timeBetweenFramesInMilliseconds)
timeBetweenFramesInMilliseconds - - value in millisecondspublic boolean isLoopContinuously()
public void setLoopContinuously(boolean loopContinuously)
loopContinuously - true / falsepublic String getUniqueName()
public String getRootDir()
public void setRootDir(String rootDir)
rootDir - - path to folder absolute or relative to project dirpublic String getScreenshotsFolderName()
public void setScreenshotsFolderName(String screenshotsFolderName)
screenshotsFolderName - - path to folder where screenshots will be stored relative to rootDirpublic String getGeneratedGIFsFolderName()
public void setGeneratedGIFsFolderName(String generatedGIFsFolderName)
generatedGIFsFolderName - - path to folder for generated GIFS relative to rootDirCopyright © 2018. All rights reserved.