Here is the RDoc for CSV. I found it really easy to follow. The only problem is if you have double quotes in some of your CSV data it throws things off. I swapped them out (like back in the day with SQL Server) and back in when needed.
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Kohl
Sent: August 25, 2005 10:55 AM
To: wtr-general@rubyforge.org
Subject: RE: [Wtr-general] reading from a file

You can use the Ruby CSV library to access data from a delimited file. Read in a particular value, store it in a variable, and then use that variable in place of the hardcoded value.
 
-Jonathan


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nishita Acharya
Sent: August 25, 2005 5:26 AM
To: Wtr-general@rubyforge.org
Subject: [Wtr-general] reading from a file

hello,
       The following stmts chooses "canadaEnglish" from the drop down list.Now  thsi string has been hard coded..i want to know how the same string can be read frm a   csv(comma separated variable) file.
 
   #CODE
   puts 'Step 2: Select Canada from the Top Stories drop-down list'
   $ie.select_list( :index , 1).select("Canada English")
   puts '  Action: selected Canada from the drop-down list.'
   #END OF CODE
 
Regards,

Nishita Acharya
Bangalore.

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to