Automating web page screen captures (Ian Landsman's dream app)

Ian Landsman’s comment of wanting the spawn of SnapZ Pro X and Selenium to automate capture of web page screen shots got me thinking. Sounded like a challenge to me.

So I ran the first really simple demo from http://www.openqa.org/selenium/demos.html and captured a full run with SnapZ (just the frame area containing the actual application).

Then I saved the resultant movie and opened it in QuickTime Pro 7. Lo and behold there’s an export format of “Movie to Image Sequence”, did that (setting appropriately low frame rate and other options) and I now have a run of pictures to pick from of the demo app at different stages. Cool.

I’m not sure how easy Selenium is to use, but it’s given me some ideas on how to quicken production of my screenshots for the next version of CaseDetective, hopefully Ian will see this and have a play with SnapZ and QuickTime to see how that fairs.

Here’s a sample of them (OK, not pretty, the demo app really is simple, but you get the gist)…

SafariScreenSnapz0011.jpgSafariScreenSnapz0012.jpgSafariScreenSnapz0013.jpgSafariScreenSnapz0014.jpgSafariScreenSnapz0015.jpgSafariScreenSnapz0016.jpgSafariScreenSnapz0017.jpgSafariScreenSnapz0018.jpgSafariScreenSnapz0019.jpg

Oh yeah, it took less than 3 minutes for me to work it all out and get these results, but a lot longer to actually write this little blog post!

No comments.

  1. How now brown cow! I guess instead of $200 it might only cost me $29 for Quicktime pro! I’ll definitely be fiddling with this as well after I get this next release out on Monday (no time to fiddle before then.). I’ve also been thinking that I might be able to use some Applescript to do what I want, but haven’t looked into it.

    One thing that’s still missing is the nice job Snap Z does with rounding the corners and so on, but a batch job in Photoshop should be able to perform similar results.

  2. Looks neat. Can you get the demo to repeat otherwise its easy to miss and you just see the last image.

  3. @Ian

    Your problem is always going to be getting your initial script written, a bit like automated unit tests, there’s pain at the beginning but once you have your scripts you can run them over and over again. Maybe you should think of it as an exercise in getting some automated testing set up with the added bonus of being able to extract a few screen shots from the movie. Maybe you could even use the movie on your website?

    @Neville

    Yep, you can run the demo over and over again, you can even step through it action by action by simply hitting a button repeatedly once you’ve selected “Step”.

    I should add that this stuff has got nothing to do with me, I just fancied trying to see whether I could string Ian’s ideas together to get a result.