title: Load a web page, execute its JavaScript and dump resulting HTML to a file
body: <p>I need to load a web page, execute its JavaScript (and all js files included with the  tags) and dump resulting HTLM to a file. This needs to be done on the server. I have tried node.js with zombie.js but it seems it is too immature to work in the real world. More often than not it just throws a bogus exception while a real browser (FireFox) has no issues with the page.</p>
  
  <p>My node.js code is:</p>
  
  <pre><code>var zombie = require("zombie"),
      sys = require('sys');
  
  // Load the page
  var browser = new zombie.Browser({ debug: false });
  browser.visit('http://www.dba.dk', function (error, browser, status) {
      if (error) { console.log('Error:' + error.message); }
      if (!error &amp;&amp; browser.statusCode == 200) {
          sys.puts(browser.html);
      }
  });
  </code></pre>
  
  <p>and it exits with an exception "TypeError: Cannot call method 'toString' of null"</p>
  
  <p>Jaxer is not really an option.. I need to download a 3rd party page and execute it on my server. How would I do that with Jaxer</p>