When trying to capture a screenshot of an entire webpage, I encountered a challenge. The code I used below with Firefox successfully took a screenshot of the whole page, but it didn't work with Chrome. According to the API documentation, I should use webdrivercss, but I'm unsure about how to do that. Can anyone provide assistance on how to modify this code for capturing screenshots using Chrome?
var webdriverio = require('webdriverio');
var options = {
desiredCapabilities: {
browserName: 'chrome'
}
};
var size;
webdriverio
.remote(options)
.init()
.windowHandleMaximize(false)
.url('http://webdriver.io/')
.saveScreenshot('./chrome.png')
.end();
I would greatly appreciate any help offered.