The example code makes use of async and await, so please be on Node.js 7.8+.Īs always I recommend NVM for installing different versions of Node. There’s a ton of services for this out there, but if you have some kind of edge case or simply just need a better way of taking screenshots, please read on. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:30456) DeprecationWarning: Unhandled promise rejections are deprecated. Update: A Chrome update actually broke the code for full page screenshots using forceViewport, the code samples have been updated to support the change.įull error message: (node:30456) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Emulation.forceViewport is not a function If you’re brave, you can use Windows too □ This post will cover installation and running the script on either Mac OS or Linux. A returning subject on this blog, how to automate device screenshots with Node.js and Chrome.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |