Headless Chrome has been available via the chrome command since version 59. (Note: you may need to add an alias to use the command). The —dump-dom flag, for example, can be used to get the DOM contents of a page. Instead, we can use the —screenshot flag to take a screenshot.