Closed quanghoc closed 7 years ago
chrome.screenshot('body')
returns a buffer of data, so you'll have to save it via the fs
module or something else. Here's a snippet of code:
const data = await chrome.screenshot('body');
const buffer = new Buffer(data, 'base64');
fs.writeFileSync(`some/file/path.png`, buffer, 'base64');
Thanks
I am using Chrome stable v60 (not Canary). The code is below
I ran fine without error but no screenshot file either.
Any help?