WebdriverIO plugin to save a screenshot of the entire viewport. Re-worked from documentScreenshot from WebdriverCSS
var webdriverio = require('webdriverio');
var documentScreenshot = require('lib-webdriverio-document-screenshot');
var client = webdriverio.remote(capabilities);
client.addCommand('documentScreenshot', documentScreenshot);
client
.init()
.windowHandleSize({
width: 1200,
height: 1000
})
.url('http://mysite.com')
.documentScreenshot('mysite-screenshot.png', {
/**
* Time (in ms) to pause between each scroll and screenshot
* @default 0
* @type {Number}
*/
shotDelay: 500,
/**
* Indicates if documentScreenshot should scroll and stitch together screenshots of the entire document
* @default true
* @type {Boolean}
*/
shouldScroll: true
})
.end();
- Plugin for WebdriverIO
- GraphicsMagick for image manipulation
- fs-extra for handy file system utilities