views:

274

answers:

1

What I'm looking for is a method that works like "captureScreenshot(String path)", but instead of producing an image is saves the DOM as it currently is. Note that the existing getBodyText() method is not enough.

+1  A: 

What you're looking for is:

getHtmlSource()

It will save all the content as a string in a variable, and then you can parse the dom as you want.

Santi
getHtmlSource() is, unfortunately, a bit buggy AFAICT: http://clearspace.openqa.org/thread/22095?tstart=0
sampablokuper