Additional package for WebdriverIO. Provides custom commands for taking and saving screenshots of particular elements on the page.
var client = require('webdriverio').remote({...})
var wdioElementScreenshot = require('wdio-element-screenshot');
...
wdioElementScreenshot.init(client);
...
client
.saveElementScreenshot('#block', 'block.png')
.then(...);
This package adds 3 custom commands to WebdriverIO client:
Saves element screenshot to png file. Returns Promise
that resolves with elements screenshot image data
Type: String
Selector that specifies a particular element e.g. body
. Notice that if selector specifies several elements, the first one will be taken
Type: String
The saving file name
Takes element screenshot. Returns Promise
that resolves with elements screenshot image data
Type: String
Selector that specifies a particular element e.g. body
. Notice that if selector specifies several elements, the first one will be taken
Gets element absolute bounding rect. Returns Promise
that resolves with elements absolute bounding rect
Type: String
Selector that specifies a particular element e.g. body
. Notice that if selector specifies several elements, the first one will be taken
npm install
./node_modules/.bin/selenium-standalone install
./node_modules/.bin/selenium-standalone start
npm run test