We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any chance to use .screen for full loaded document height + width?
The text was updated successfully, but these errors were encountered:
solution I'd like to add:
this.repl.defineCommand('screentofile', { help: 'saves screenshot to given file', action: function(fileName) { var fullPage = true; self.client.send('Page.getLayoutMetrics', function(err, res){ var metrics = res; var width = Math.ceil( fullPage? metrics.contentSize.width : metrics.layoutViewport.clientWidth ); var height = Math.ceil( fullPage? metrics.contentSize.height: metrics.layoutViewport.clientHeight); var clip = {x: 0, y: 0, width, height, scale: 1 }; self.client.Page.captureScreenshot( { clip }, function(err, res) { var binData = Buffer.from(res.data, 'base64'); fs.writeFile(fileName, binData, function(err) { if(err) { self.writeLn( err ); } }); self.writeLn(fileName); }); }); } });
Sorry, something went wrong.
hi! yes, probably a good feature to add. Similar puppeteer code: /~https://github.com/GoogleChrome/puppeteer/blob/bd73e4b7b814f0a9df97158f9102e486618c6075/lib/Page.js#L678-L690
No branches or pull requests
Any chance to use .screen for full loaded document height + width?
The text was updated successfully, but these errors were encountered: