Read from XLS and substitute values in Ruby (Watir)

M

Madu Nar

Hello there,
I am trying to read multiple columns from an xls file and substiture
those values into a text_field

Ex: My xls contains
User Name password
aaa abc321
bbb abc123


I need to pass each row of records into a text_fields for username and
password and click on go...

I need to do this till the end of the file... could somebody tell me as
to how I parameterize the values for the text fields so that it
automatically picks up the records for each row...

Any help is greatly appreciated.

Thank you,
MN
 
M

Madu Nar

Hello Paul,
Thank you so much for the Info...
I tried and it did work. But, how do I pass each of those split
tokens as separate parameters for the text fields.

Ex: ie.text_field:)name,
"SearchFormHandler.searchTerms").set("Brian Kantz")
ie.select_list:)name,
"SearchFormHandler.state").select("California")

So the values Brian Kantz, California should be automatically
substituted from the file... Your help is greatly appreciated...

Thanks,
Madu
 
M

Madu Nar

Also,Is there a way to read from csv file or xls file because currently
I am trying to read from a txt file.
Should I Require/import any particular libraries before trying to read
from a CSV or an xls file.
Any help appreciated.

Thanks again,
Madu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,016
Latest member
TatianaCha

Latest Threads

Top