title: Selenium WebDriver - compile HTML string
body: <p>I want to use Selenium <code>WebDriver</code> to compile html <code>String</code>, the only examples i found are for opening files like :</p>
  
  <pre><code>WebDriver driver = new FirefoxDriver();
  driver.get("file:///C:/Users/jgong/Desktop/a.html");
  </code></pre>
  
  <p>I need:</p>
  
  <pre><code>WebDriver driver = new FirefoxDriver();
  driver.get(htmlString);
  </code></pre>
  
  <p>and then use the <code>getPageSource()</code> method, is it possible?</p>
  
  <p>Thanks.</p>