getting the raw source from Firefox with javascript <p>I am writing a program to validate web pages on a remote server. It uses selenium RC to run Firefox with a battery of tests, so I can call arbitrary javascript. When there is a failure I would like to log the page's generated HTML. Now getting access to the DOM HTML is easy, But I am having real trouble finding a way to get at the source. Thanks.</p> <p>I should reiterate that I am not looking for the DOM, but the original unmodified source code. As can be seen through Right click -> view page source. Specifically if <code>&lt;Html&gt; &lt;body&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; fear the table data &lt;/td&gt; &lt;/table&gt;</code></p> <p> is the real HTML. Calls to <code>document.documentElement.outerHTML || document.documentElement.innerHTML</code> and <code>selenium.getHTMLSource()</code> will result in <code>&lt;head&gt; &lt;/head&gt;&lt;body&gt; &lt;table&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt; fear the table data &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;/body&gt;</code></p>