Firefox
Firefox has a built-in helper function
:screenshot
to capture screenshot of the current page from the console.For example,
:screenshot
:screenshot --fullpage
:screenshot --selector .css-selector
Safari
In Safari, you can capture screenshot of the viewport from the Console using
console.screenshot()
.Alternatively, pass the target node to the function to capture screenshot of a specific node.