title: In Watir, how to get the full text, from a portion of text?
body: <p>I have a portion of HTML that looks similar to:</p>
  
  <pre><code>&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;
  &lt;td&gt;&lt;div&gt; Text Goes Here &lt;/div&gt;&lt;/td&gt;
  &lt;td&gt; ... rest of table
  </code></pre>
  
  <p>There are no IDs, no Titles, no descriptors of any kind to easily identify the div that contains the text.</p>
  
  <p>When an error occurs on the page, the error is inserted into the location where "Text Goes Here" is at (no text is present unless an error occurs).  Each error contains the word "valid".
  Examples: "The form must contain a valid name" or "Invalid date range selected"</p>
  
  <p>I currently have the Watir code looking like this:</p>
  
  <pre><code>if browser.frame(:index =&gt; 0).text.includes? "valid"
    msg = # need to get full text of message
    return msg
  else
    return true
  end
  </code></pre>
  
  <p>Is there any way to get the full text in a situation like this? 
  Basically: return the full text of the element that contains the text "valid" ?</p>
  
  <p>Using: Watir 2.0.4 , Webdriver 0.4.1</p>