title: How to retrieve visible text alone from webelement?
body: <p>How to get only the text that is visible (excluding hidden texts) on UI from a webelement (Selenium) using java? I have tried using javascript. For example: </p>
  
  <pre><code>&lt;span class='message'&gt;
  this part is visible
  &lt;span&gt;
  visible
  &lt;/pan&gt;
  &lt;span&gt;
  hidden
  &lt;/span&gt;
  visible
  &lt;/span&gt;
  </code></pre>
  
  <p>I wan to retrieve only "this part is visible visible visible" from span with class 'message'.</p>