title: Select a link in a table row based on cell content
body: <p>Using Selenium IDE, I am trying to locate a link within a table row. The table rows are dynamically generated. Each row has some cell with text content and a cell with possibly two or more links.</p>
  
  <p>What I'd like to do is to create an automated test that clicks a specific link within a specific row as referenced by a specific text. For example, on the table below:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;table border="1"&gt;
   &lt;tr&gt;
     &lt;td&gt;
      Hello World!
     &lt;/td&gt;
     &lt;td&gt;
      Type Greeting
     &lt;/td&gt;
     &lt;td&gt;
      &lt;a href="www.foo.com/view/id=123456"&gt;View&lt;/a&gt;
      &lt;a href="www.foo.com/delete/id=123456"&gt;Delete&lt;/a&gt;
     &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td&gt;
      Buenos Dias!
     &lt;/td&gt;
     &lt;td&gt;
      Type Greeting 
     &lt;/td&gt;
     &lt;td&gt;
      &lt;a href="www.foo.com/view/id=789101"&gt;View&lt;/a&gt;
      &lt;a href="www.foo.com/delete/id=789101"&gt;Delete&lt;/a&gt;
     &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The scenario is, on a previous page I add data "Buenos Dias!". The next page will display a table of all data added. I want to be able to click on the "View" link of the data that was just added (in this case, the "Buenos Dias!" entry).</p>
  
  <p>What would be a good way to locate the "View" link by referencing the text "Buenos Dias!"? </p>
  
  <p>I am able to locate the cell which contains the text: </p>
  
  <pre><code>//td[text()="Buenos Dias!"] 
  </code></pre>
  
  <p>But I want to use it somehow as a reference for locating its respective "View" link from the table. I tried out sibling formats (following, preceding) and I cant seem to get it to work right. Using an absolute xpath (html/body/table/tbody/tr[1]/td[3]/a[1]) will not work as the data could change and the entry appear on a different row. </p>
  
  <p>Thanks in advance and let me know if you need more information.</p>
  
  <ul>
  <li>Selenium IDE 1.7.2</li>
  <li>Firefox 9.0.1</li>
  <li>Mac OS X Lion 10.7.3</li>
  </ul>