Hi,
Have done this, but am getting error:
1) Error:
test_recorded(TC_recorded):
NoMethodError: undefined method `length' for nil:NilClass
testnic2.rb:50:in `test_recorded'
Have copied my script again in case I've done something wrong?
excel = WIN32OLE::new('excel.Application')
workbook = excel.Workbooks.Open('C:\Documents and Settings\kennedyn\My
Documents\WATIR_RUBY\excel_testdata.xls')
worksheet = workbook.Worksheets(1) #get hold of the first worksheet
worksheet.Select
@mydata = []
@mydata = worksheet.Range('a1:a4')['text'] # The data is in cell a1.
excel['Visible'] = true # hide the spreadsheet from view
workbook.close
excel.Quit
# Insert the data read from the spreadsheet into the text field
#$ie.text_field(:name, 'TEST').set $data
#ie.goto('http://' + @mydata)
# Insert the data read from the spreadsheet into the text field
#$ie.text_field(:name, 'TEST').set $data
@mydata.length do |x|
ie.goto('http://' + @mydata[x])
end
TIA
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general