I am running a test case, in which I want to store all the values of a table in 
variables, I am using the below code:

require 'watir'
ie=Watir::IE.start("C:\test.htm")
class Test
def test_row_collection(ie)
    t= ie.table(:class,'listView')
    value_i = 0
    t.rows.each do |row|
    puts row
    puts "Our Number is " && value_i
   value_i += 1
    end    
  end 
end
  
TestObj = Test.new
TestObj.test_row_collection(ie)

It displays the following output:
type:         
id:           
name:         
value:        
disabled:     false
0
type:         
id:           
name:         
value:        
disabled:     false
1
type:         
id:           
name:         
value:        
disabled:     false


If I used  "puts row.text" in the above definition, it displays the following 
output.
0
01/14/2007 Jan/2007 2007 13 Open 
1
01/15/2007 Jan/2007 2007 16 Open 

I want to store values like this:
date1 = 01/14/2007,  month1= Jan/2007, Year1= 2007, value1 = 13, Status1 = Open
date2 = 01/14/2007,  month2= Jan/2007, Year2= 2007, value2 = 16, Status2 = Open

Please help me out in doing this.
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