For those of us obsessed with automation, the PhantomJS library was manna from heaven, allowing you to programmatically automate web interactions against a ‘real’ web browser without need a screen to interact with.
Headless Chrome is still new, and there isn’t much material to chew on yet, but I came across this blog post, which shows how to set up an Ubuntu Trusty server with a simple screen grabber script.
I thought I’d transfer this to a Docker container, as lightweight spinning up of these processes will be a boon for testing.
Here’s a video of the script getting screenshots of two randomly-chosen websites:
The repository is here.
My book on Docker:
Get 39% off with the code: 39miell