I have a table structure like this:

<table class="listView" width="354">  
    <tbody class="dataContainer" id="dataContainer">
      <tr class="odd">
        <td class=" " width="76">&nbsp;01/16/2007</td>
        <td class=" " width="56">Jan/2007</td>
        <td class=" " width="32">2007</td>
        <td class=" number" width="25">13</td>
        <td class=" number" width="34">Open</td>
        <td class=" number" width="34">None</td>
        <td class=" number" width="34">None</td>
        <td class="end " width="2"></td>
        <td class="filler" width="6">&nbsp;</td>
      </tr>
    </tbody>
  </table>

I am using the following code:
require 'watir'
ie = Watir::IE.attach(:title, /New/)
class Test
def test_row_collection(ie)
    row= ie.table(:index,'1')[1]
    row.each do |cell|
     puts cell.text    
    end    
  end 
end

TestObj = Test.new
TestObj.test_row_collection(ie)

It produce the following result:
>ruby test1.rb
01/16/2007
Jan/2007
2007
13
Open
None
None

>Exit code: 0

Is there is a way to store all the values in some variable, like 
day=01/16/2007, month=Jan/2007, year=2007, status=13, value=open.

Thanks in advance
Vikash


                
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to