Hi,
I did this and the logs showed the websites as follows:
www.google.co.uk
www.freeuk.com
www.bbc.co.uk
www.manilow.com
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
The test then just ends, with no errors, but the test doesn't take me to the
four websites.
As an aside as well, I don't want it to enter nil as the web address, so is
there a way once this is fixed, that it knows to stop putting stuff into the
array when the next cell is empty.
Have pasted script as it stands below
excel = WIN32OLE::new('excel.Application')
workbook = excel.Workbooks.Open('C:\Documents and Settings\kennedyn\My
Documents\WATIR_RUBY\excel_testdata2.xls')
worksheet = workbook.Worksheets(1) #get hold of the first worksheet
worksheet.Select
@mydata = []
@mydata = worksheet.Range('a1:z1').value # The data is in cell a1.
puts @mydata # to c wether the content is in the array.
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