1.1.2 • Published 6 years ago

lib-webdriverio-document-screenshot v1.1.2

Weekly downloads
6
License
ISC
Repository
github
Last release
6 years ago

lib-webdriverio-document-screenshot

WebdriverIO plugin to save a screenshot of the entire viewport. Re-worked from documentScreenshot from WebdriverCSS

Usage

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();

Libraries