title: Ruby Watir selecting text from table
body: <p>I have a tabbed table that I am trying to get the value from the "Active" Column for various services that are running. </p>
  
  <pre><code>Services
      Service                    Active
      SERVICE1                   YES
      SERVICE2                   NO
      SERVICE3                   YES
  </code></pre>
  
  <p>I was hoping to use something like this from the table. But this doesn't seem to work for me. Goal is to select one of the services and find out if it is active YES or NO and put it in a variable. You guys have been a great help to me in previous answers and I really appreciate your help and input. </p>
  
  <pre><code>browser.td(:text =&gt; "SERVICE1").parent.td(:index =&gt; 1).flash 
  </code></pre>
  
  <p>I get an error like this when I try to use the above code</p>
  
  <pre><code>/home/bill/.rvm/gems/ruby-1.9.2-p320@vts_automated/gems/watir-webdriver-0.6.4/lib/watir-webdriver/elements/element.rb:490:in `assert_exists': unable to locate element, using {:id=&gt;"services", :tag_name=&gt;"td"} (Watir::Exception::UnknownObjectException)
  </code></pre>
  
  <p>My html code looks like this</p>
  
  <pre><code>&lt;table class="tabbed_table" cellspacing="5"&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;
  &lt;h2&gt;Appliance&lt;/h2&gt;
  &lt;dl class="table-display"&gt;
  &lt;dt class="wide"&gt;Product version: &lt;/dt&gt;
  &lt;dd class="wide"&gt;xxxxx&lt;/dd&gt;
  &lt;dt class="wide"&gt;Serial number:&lt;/dt&gt;
  &lt;dd class="wide"&gt;xxxxxx&lt;/dd&gt;
  &lt;dt class="wide"&gt;System Time:&lt;/dt&gt;
  &lt;dd class="wide"&gt;Wednesday, October 30, 2013 02:02PM CDT&lt;/dd&gt;
  &lt;/dl&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;h2&gt;Services&lt;/h2&gt;
  &lt;table id="services"&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;th&gt;Service&lt;/th&gt;
  &lt;th&gt;Active&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr class="alt"&gt;
  &lt;td class="no_bg"&gt;SERVICE1&lt;/td&gt;
  &lt;td class="no_bg"&gt;YES&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class="normal"&gt;
  &lt;td class="no_bg"&gt; SERVICE2 &lt;/td&gt;
  &lt;td class="no_bg"&gt;NO&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class="alt"&gt;
  &lt;td class="no_bg"&gt; SERVICE3 &lt;/td&gt;
  &lt;td class="no_bg"&gt;YES&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>