Tuesday, November 13, 2007

On the prospects of creating a headless Firefox

I've often wondered how hard it would be to make a headless version of Firefox. HTTPUnit is nice and all but if you want to ensure that everything is behaving as it does in a real browser there's nothing better than using a real browser.

So setting aside all questions as to difficulty does the idea of a headless Firefox even make conceptual sense? You'd at least need some way to script or control the behavior externally. But let's imagine you designed a feature where by hovering over an event you triggered an Ajax request or caused some DOM fragment to be constructed on the fly. In order to get the headless browser to do that you'd need to either have to tell it to simulate the mouse movement or tell it to artificially fire the hover event for the element in question.