lib-webdriverio-document-screenshot

1.1.2 • Public • Published

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

Package Sidebar

Install

npm i lib-webdriverio-document-screenshot

Weekly Downloads

0

Version

1.1.2

License

ISC

Unpacked Size

1.11 MB

Total Files

26

Last publish

Collaborators

  • reginaldthistleton