Hi, I am using following code to check the validaity of different user inputs using data driven test.
-------------------------------------------- require 'test/unit' require 'xls' require 'watir' class Gmail < Test::Unit::TestCase def test_Gmail_Working xlFile = XLS.new(Dir.pwd + '/Stopwords-List.xls') #grab the data file in the same dirrectory myData = xlFile.getRowRecords('Stopwords list','Stopwords') #pull data records from excel xlFile.close #Open IE and navigate to site ie = Watir::IE.new ie.goto "http://www.acs.org/" # Click the link 'Journals' ie.link(:text, "Journals").click sleep 1 # starting loop myData.each do |record| #Search text field ie.text_field(:name, "searchText").set(record['Stopwords']) ie.button(:name, "searchSub").click # Verify that page contains text if(ie.text.include?(record['Expected Result'])) puts "Stopword '#{record['Stopwords']}' excluded successfully" # Want to put Passed in excel sheet if the case pass else puts "Stopword '#{record['Stopwords']}' not excluded" # Want to put Failed in excel sheet if the case fails end sleep 2 end # Close the browser ie.close end end ----------------------------------------- As I am picking up data from an excel sheet from column 'Expected Result' and depending upon the result I want to update the same excel sheet in the column 'Actual Result' for corresponding rows. Please help me on above. Thanks & Regards Durgesh. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---