title: Selenium: How to get plain text from html source?
body: <p>i'm going to rewrite all my tests project, by replacing Selenium by HtmlUnit because i'm not able to get plain text in selenium as i can do with htmlunit using "HtmlPage:asText" method. Getting plain text can help me to verify easily the content of a page, without  paying attention of the presence or not of the tags.</p>
  
  <p>For example a plain text like this " One, two three" may correspond to many html source: </p>
  
  <pre><code>&lt;p&gt;One, two three&lt;/p&gt; 
  </code></pre>
  
  <p>or <code>&lt;table&gt; &lt;tr&gt;&lt;td&gt;One1&lt;/td&gt;&lt;td&gt;two&lt;/td&gt;&lt;td&gt;three&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;</code>
  or <code>&lt;div&gt;&lt;span&gt;One, &lt;/span&gt; &lt;span&gt;two, &lt;/span&gt; &lt;span&gt;three, &lt;/span&gt; &lt;/div&gt;</code></p>
  
  <p>By using HtmlUnit i can write functional test without  paying attention of how the actual content will be represented in the html format.</p>