TestStack/TestStack.Seleno — pull request #168 by aaronpowell (2014-08-08 03:46:22+00:00)
Title: Adding ability to dump DOM out like a screenshot

I've hit a few instances where the screenshot API isn't enough to give me a look at what is in the DOM, maybe the DOM structure has changed and I want to see what my selector should really be hitting (especially useful if you're using AngularJS).

The new `IDomCapture` allows you to do just that, dump the DOM out as a string when an error occurs, just like a screenshot.

I've included the default implementation (write to the FS) and a Null implementation. I've also added a proxy class like the Camera uses. I'm not really familiar with Castle proxies so I'm not sure if you can chain them (ie - have both the Camera and DomCapture running), but as I said this is the first pass and looking for feedback.

I'm using a modified version of this in my own app (wrote my own camera that wrapped `FileCamera` to dump out the DOM before doing the screenshot).