I'm trying to take a screenshot of the full page using WebdriverIO.
I've read that the best method is to use WebdriverCSS to enhance my WebdriverIO flows. WebdriverCSS automatically screenshots the entire page??
The problem is that WebdriverCSS is not working for me. I think it's because it is not yet compatible with [email protected]
.
Is there any way to make it work or another solution that I could use?
My code: (which is producing nothing but undefined values in the callback)
// Initialize WebdriverCSS for `client` instance
require('webdrivercss').init(driver, {
// example options
screenshotRoot: '../../screenshots',
failedComparisonsRoot: '../../screenshots/diffs',
misMatchTolerance: 0.05
});
// ...
// driver gets initialized and url opened
// ...
driver.webdrivercss('page', {
name: 'body',
elem: 'body'
}, function(err, res) {
// here the values of err and res are always undefined
})
.saveScreenshot('../../screenshots/webdrivercsstest.png');
// the screenshot works, but it's not full page
!EDIT: This is a known BUG in Chromium which most likely will not be fixed. Please see this LINK for more details.