I am using WATIR for automated testing, and I need to copy in a variable the value of a rate. In the example below (from webpage source code), I need that variable myrate
has value 2.595
. I know how to retrieve value from <input>
or <span>
(see below), but not directly from a <td>
. Any help? Thanks
<TABLE>
<TR>
<TD></TD>
<TD>Rate</TD>
<TD>2.595</TD>
</TR>
</TABLE>
For a <span>
I use this code:
raRetrieved = browser.span(:name => myForm.raNumber ).text