GIF WebDriver wrapper

Wrapper on top of webdriver that is able to generate a GIF during the execution of a test

License

License

MIT
GroupId

GroupId

com.github.bogdanlivadariu
ArtifactId

ArtifactId

gif-webdriver
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

GIF WebDriver wrapper
Wrapper on top of webdriver that is able to generate a GIF during the execution of a test
Project URL

Project URL

https://github.com/web-innovate/gif-webdriver
Source Code Management

Source Code Management

https://github.com/web-innovate/gif-webdriver

Download gif-webdriver

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.bogdanlivadariu/gif-webdriver/ -->
<dependency>
    <groupId>com.github.bogdanlivadariu</groupId>
    <artifactId>gif-webdriver</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.bogdanlivadariu/gif-webdriver/
implementation 'com.github.bogdanlivadariu:gif-webdriver:1.0.2'
// https://jarcasting.com/artifacts/com.github.bogdanlivadariu/gif-webdriver/
implementation ("com.github.bogdanlivadariu:gif-webdriver:1.0.2")
'com.github.bogdanlivadariu:gif-webdriver:jar:1.0.2'
<dependency org="com.github.bogdanlivadariu" name="gif-webdriver" rev="1.0.2">
  <artifact name="gif-webdriver" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.bogdanlivadariu', module='gif-webdriver', version='1.0.2')
)
libraryDependencies += "com.github.bogdanlivadariu" % "gif-webdriver" % "1.0.2"
[com.github.bogdanlivadariu/gif-webdriver "1.0.2"]

Dependencies

compile (6)

Group / Artifact Type Version
org.seleniumhq.selenium : selenium-java jar 3.10.0
org.apache.logging.log4j : log4j-core jar 2.3
commons-io : commons-io jar 2.5
org.apache.commons : commons-lang3 jar 3.7
org.testng : testng jar 6.14.2
org.mockito : mockito-core jar 2.17.0

Project Modules

There are no modules declared in this project.

gif-webdriver

Build Status codecov Maven metadata URI

add the library to your project's pom.xml file

<dependency>
    <groupId>com.github.bogdanlivadariu</groupId>
    <artifactId>gif-webdriver</artifactId>
    <version>LATEST</version>
</dependency>

sample usage

    public void sampleGifDriver() {
        // initialize the driver
        WebDriver driver = new GifWebDriver(new ChromeDriver());
        //WebDriver driver = new GifWebDriver(new FirefoxDriver());
        //WebDriver driver = new GifWebDriver(new RemoteWebDriver());

        // you can use either driver webdriver/gifdriver
        GifWebDriver gifDriver = (GifWebDriver) driver;

        // screenshots will be taken implicitly on click events
        driver.findElement(By.id("someIDon a page")).click();

        // on quit the driver will generate the gifs
        driver.quit();

        // if you want to control when gifs are generated you can do it through the API
        File createdGif = gifDriver.getGifScreenshotWorker().createGif();

        //of course you can create screenshots explicitly
        gifDriver.getGifScreenshotWorker().takeScreenshot();

        // if you don't know where the screenshots are taken or where the gifs are created
        String rootFolder = gifDriver.getGifScreenshotWorker().getRootDir();

        // more options about where the gifs are created can be accomplished by using these methods
        GifScreenshotWorker gifWorker = gifDriver.getGifScreenshotWorker();
        gifWorker.setTimeBetweenFramesInMilliseconds(1000);
        gifWorker.setRootDir("some place where files screenshots and gifs will be placed");
        gifWorker.setLoopContinuously(true);

        // these properties can be set during initialization as well
        GifScreenshotWorker myPreciousWorker = new GifScreenshotWorker(
            new ChromeDriver(),
            "rootDir",
            "screenshots folder name",
            "generatedGifs folder name",
            true
        );

        WebDriver myPreciousDriver = new GifWebDriver(new ChromeDriver(), myPreciousWorker);
        // and from here it's pretty much all the same
    }
com.github.bogdanlivadariu

Web innovate

Have an idea of something to innovate, start growing it here.

Versions

Version
1.0.2
1.0.1
1.0.0