miscode mhc = Array::new | V company = Array::new On Mon, Jul 27, 2009 at 2:46 PM, takanobu watanabe<rreedd...@gmail.com> wrote: > I use CSV like that below > > -import.rb-(csv import)- > #! ruby -Ku > #!/usr/bin/env ruby > > require 'csv' > > $KCODE = 'UTF8' > > #import company-data settings > mhc = Array::new > CSV.foreach("data/company_var.csv") do |row| > company << Kconv.kconv(row.join(','),Kconv::UTF8) > end > > $company_code = company[1].split(',').last.to_s > $company_name = company[2].split(',').last.to_s > $zip_code = company[3].split(',').last.to_s > $select_prefecture = company[4].split(',').last.to_s > $select_prefecture2 = company[5].split(',').last.to_s > $address_district = company[6].split(',').last.to_s > > something like that. > then you can use that values > -Test case file- > require 'import' > > some test code... > $company_name... > > But,Maybe someone knows more simple and smart way. > > Hope it help you. > It is work,I use it for job too. > tknv/ > > On Mon, Jul 27, 2009 at 1:39 AM, Chris > McMahon<christopher.mcma...@gmail.com> wrote: >> >> >> >> On Jul 25, 9:03 am, RAM <rahulbhai...@gmail.com> wrote: >>> Hi all........I am very new to Watir....anybody here knows how to >>> import value from .CSV files and Export Results into an .CSV file in >>> Watir????. >>> Please reply and provide links if similar subject is already posted. >> >> I wrote a toy framework that does exactly this: >> http://chrismcmahonsblog.blogspot.com/2009/04/ui-test-framework-design-using-watir.html >> >> Please let us know if that is useful. >> >> -Chris >> >> >> > > > > -- > tknv/ >
-- tknv/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---