Re: [Wtr-general] Running test script once for each datarow in excel
This is very simple with a CSV file: require 'csv' CSV::Reader.parse(File.open(ARGV[0], 'rb')) do |row| #open the filename given as first command line argument userid = row[0] #note that the CSV module index starts at 0 passwd = row[1] loginToSite(userid,passwd) #whatever your login code is End Cheers, Ian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vipul Sent: Friday, May 11, 2007 7:51 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] Running test script once for each datarow in excel i am testing a site which has login page. i want to automate login with different user credentials each time. i want username and pwd values to come from excel sheet or input.rb whichever possible. Does anyone has the code or suggestion for implementing this. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Running test script once for each datarow in excel
David Brown posted an interface to Excel on the Watir user contributions area with an example usage case that steps through rows: http://wiki.openqa.org/display/WTR/Excel+interface+class -Charley On 5/11/07, Vipul <[EMAIL PROTECTED]> wrote: i am testing a site which has login page. i want to automate login with different user credentials each time. i want username and pwd values to come from excel sheet or input.rbwhichever possible. Does anyone has the code or suggestion for implementing this. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Running test script once for each datarow in excel
i am testing a site which has login page. i want to automate login with different user credentials each time. i want username and pwd values to come from excel sheet or input.rb whichever possible. Does anyone has the code or suggestion for implementing this. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general