Skip to content

cakecatz/nightmare-animated-gif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nightmare animated gif CircleCI

Nightmare plugin for generating animated gif.

Install

npm i nightmare-animated-gif

Usage

Use .use(animatedGif.captureAs(label)) like .screenshot().
After that, you can use generate(label) for generate animated gif 😎

var Nightmare = require('nightmare');
var animatedGif = require('nightmare-animated-gif');
var nightmare = Nightmare();

nightmare
  .goto('http://yahoo.com')
  .use(animatedGif.captureAs('search'))
  .type('form[action*="/search"] [name=p]', 'github nightmare')
  .use(animatedGif.captureAs('search'))
  .click('form[action*="/search"] [type=submit]')
  .wait('#main')
  .use(animatedGif.captureAs('search'))
  .end()
  .then(() => {
    animatedGif.generate('search', './search.gif', {
      repeat: 0, // forever
      delay: 1000,
      quality: 10,
    });  
  });

generated gif

animated_gif

Documentation

Settings

generate(label, output, encoderOptions)

  • encoderOptions is gifencoder's option.
    You can see full options at here.

LICENSE

MIT

About

👻 Nightmare plugin for generating animated gif.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published