ruby - Get value of a second table cell with unique text in first cell of the row with Watir -


i want value in second cell of row of table, unique value in first cell. value of second cell keeps on changing.

<table class="mm-table" cellspacing="0" cellpadding="3" border="0">   <tr class="trhover" onclick="location.href='stock.php?id=ri&p=wtch';">     <td align="left" rowspan="1" class="tdwidth35per paddingleft4px">       <a shape="rect" href="stock.php?id=ri&p=wtch"> reliance </a></td>     <td align="right" rowspan="1" class="tdwidth35per"> **951.35** </td>     <td align="right" rowspan="1" class="tdwidth30per"><font color="#008000">0.60</font></td> </tr> 

above table. there other tables same name. want access second cell contains text "951.35"

try this:

browser.table(:class => "mm-table").cell(:class => "tdwidth35per") 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -