title: put a string with html/Javascript into selenium webdriver
body: <p>I have a html document in memory as a string. It contains a <code>&lt;script&gt;</code> tag with a little script that manipulates the dom. I now want to load that html page into selenium webdriver and get back the page after the script manipulates it. Since I have the html already in memory, I don't like the idea much of writing the html into a file and load it as file with <code>driver.get("file://path/to/file")</code>. So the question is, if there is a possibility to achieve what I want.</p>
  
  <p>IF webdriver can't do it, maybe there is a possibility other than that?</p>
  
  <p>Here comes an example:</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;
  &lt;script type="text/javascript"&gt;
  function fill(){
      var i = "secret"
      document.forms[0].elements[1].value=i
  }
  &lt;/script&gt;
  &lt;/head&gt;&lt;body onload="fill()"&gt;
  &lt;form method="POST"&gt;&lt;input type="hidden" name="he1" value=""&gt;
  &lt;input type="hidden" name="he2" value=""&gt;
  &lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Obviously, I want the webdriver to perform the dom manipulation and change the form according to the script. </p>
  
  <p><strong>Note</strong> this is just an example. The actual script I need to run does much more complicated things.</p>