Hi, I am a new user of Watir and trying with google_search example for displaying reports. But it fails. Can anyone help me regarding this? The code snippet is as ..... # the Watir controller require 'rubygems' require "watir" #The main test begin #Create the new report r=CLReport.new() testReport =r.createReport('C:\\ruby\\Reports\\google_search.html') # set a variable test_site = "http://www.google.com"
# open the IE browser ie = Watir::IE.new # print some comments puts "Beginning of test: Google search." puts " Step 1: go to the test site: " + test_site ie.goto test_site puts " Step 2: enter 'pickaxe' in the search text field." ie.text_field(:name, "q").set "pickaxe" # "q" is the name of the search field puts " Step 3: click the 'Google Search' button." ie.button(:name, "btnG").click # "btnG" is the name of the Search button #puts " Expected Result:" #puts " A Google page with results should be shown. 'Programming Ruby' should be high on the list." #puts " Actual Result:" if ie.text.include? "Programming Ruby" r.addtoReport(testReport, "Test Passed. Found the test string: 'Programming Ruby'. Actual Results match Expected Results.") else r.addtoReport(testReport,"Test Failed! Could not find: 'Programming Ruby'." ) end puts "End of test: Google search." #close Browser browser.close #finish the report r.finishReport(testReport) rescue #send crash info to report r.addtoReport(testReport,'Test crashed with reason '$!, 'Failed', 'Test Crashed!') #finish the report r.finishReport(testReport) end Thanks Smita --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---