Skip to main content


Showing posts from August, 2011

Automating WebApplication Screenshot Capture

I recently contributed some introduction to the Gerrit Project. This included some screenshots and understandably the project maintainers are concerned about the overhead of keeping these screenshots up to date. So just for my own interest I've started looking in to how to automate the generation of these screenshots. This is not a working solution yet, just a collection of the ideas I'm playing with.

This first thing I started looking at was how I could automatically create a screenshots of the browser. After a bit of googling these seem to be two broad techniques. There are a few tools that given a URL will generate an image. Khtml2png and webkit2png seem to be good examples of these tools. While these are fine tools I really want to be able to capture pictures of the application as I modify it, so they don't quite serve my purpose.

The second technique seems rather more promising, starting a headless X Server using xvfb, starting firefox in it and then creating an image…