Reputation: 2885
<td align="Left">
<font color="navy">
<b>Status
: </b>
</font>
<font color="red"><b>Registered</b>
</font>
</td>
i want to do this
if(cell.text==like(status))
puts "yes"
end
actually in my table there are random tr and td , so i want to fetch the text of td which have status text in it. because it is fixed and "Registered" text may be change. so on the basis of %status% i want to select the td.
Upvotes: 3
Views: 367
Reputation: 4063
You can locate element by regular expression:
browser.td(:text => /^Status/)
Upvotes: 5