Thanks very much, managed to sort it now.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
if you are only getting 4 cells, why the array show a long list with nil. your
are missing something here. Check your code again!
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Hi,
I am completely new to WATIR, and don't have much programming experience so
forgive the simplicity of this question!
I am just learning the basics and have created a script that calls an excel
file which has a column of web addresses. I have got the scripts to read in the
first value from
$data = []
$data = worksheet.Range('a1:z1')'text' # The data is in cell a1.
excel'Visible' = false # 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
$data.length do |x|
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')
try this
@mydata = worksheet.Range('a1:a4').value
puts @mydata # to c wether the content is in the array.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
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
Hi Nicola, you could try something like this:
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