Saving full page content using Selenium

Posted by Rick on Stack Overflow See other posts from Stack Overflow or by Rick
Published on 2010-06-15T22:47:54Z Indexed on 2010/06/15 22:52 UTC
Read the original article Hit count: 209

Filed under:

Hi all, I was wondering what's the best way to save all the files that are retrieved when Selenium visits a site. In other words, when Selenium visits http://www.google.com I want to save the HTML, JavaScript (including scripts referenced in src tags), images, and potentially content contained in iframes. How can this be done?

I know getHTMLSource() will return the HTML content in the body of the main frame, but how can this be extended to download the complete set of files necessary to render that page again. Thanks in advance!

© Stack Overflow or respective owner

Related posts about selenium