I got one problem while running the automation script:
I am having 20 checkboxes in a page .NOw i want check that whether each check box is checked or unchecked.if it is checked i want to print a message. Snippet of code that i used is: require 'watir' require 'win32ole' require'rubygems' ie=Watir::IE.start("http://qa.irma.icat.com/inspwebapp") sleep(1) #~ ie.bring_to_front ie.maximize #to login to the application ie.text_field(:name, "username").set("mmanager") ie.text_field(:name, "password").set("pass") ie.image(:alt,"Log In To ICAT").click ie.link(:text, "Home").click # to check all the check boxes ie.button(:value, "Select All").click #check boxes are present inside a table under the mentioned div ter=ie.div(:class,"mainContent").table(:index,8) count=ter.row_count() puts"total count of table#{count}" i=3 #l loop to pass through all the row of the table while i <= count do puts"#{i}" # this the condition which i used to verify whether the check box is checked or not if ((ter[i][1].checkbox(:name,"selections").set)!=false) puts"Check box is not checked" else puts"Check box is checked" end i+1 end thanks in advance --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---