title: How do I read text from non visible elements with Watir (Ruby)?
body: <p>There is a div on a page that is not visible but has some value I want to capture. Calling text on it returns me an empty string.</p>
  
  <p>How do I get the value displayed without having to deal with the raw html? Can I force .text to return me the actual value regardless of the visiblity of the text in the browser?</p>
  
  <pre><code>irb(main):1341:0&gt; d.first.visible?
  =&gt; false
  
  irb(main):1344:0&gt; d.first.html
  =&gt; "&lt;div class=\"day\"&gt;7&lt;/div&gt;"
  
  irb(main):1345:0&gt; d.first.text
  =&gt; ""
  </code></pre>
  
  <p>PS: There are many many divs (the page is caching response and display them accordingly). I considered changing all the display:none in the page or clicking to make them visible but I'd prefer to avoid this if possible.
  If not possible a solution with changing all the display none would be the preferred work around.</p>
  
  <p>PPS: Damned, I tried to overload the visible? method in the Watir::Element class to always return true, but that didn't do the trick.</p>
  
  <pre><code>irb(main):1502:0&gt; d.first.visible?
  =&gt; true
  
  irb(main):1504:0&gt; d.first.text
  =&gt; ""
  </code></pre>