The local variable i in your last line isn't defined anywhere in your
script...
So: ie.text_field(:name, "productName").set $worksheet.Range("a#
{i}").value)
i isn't defined so no value is retrieved. If you are trying to
retrieve a number of cells, you can do it with a for loop:
for i in 1..5 # to get the first five cells...
ie.text_field(:name, "productName").set($worksheet.Range("a#
{i}").value) # Note the missing bracked in your original...
end
This is assuming the rest of your code is correct, which I haven't
tested. You could try outputting the Excel values to the command line
first to make sure you are getting the expected results - length is
not your problem, the error simply is there because you are passing a
nil value...
Regards,
John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---