hi angrz Thank you for the patience and support in rectifying the code. yup that was a silly mistake :) blindly followed the previous code. Here is the full code which is perfectly working now.
thanks require 'watir' require 'test/unit' include Watir class TC_mail_yahoo_check < Test::Unit::TestCase puts "## Opening the Mail.Yahoo.com site" ie = IE.new ie.goto("http://mail.yahoo.com") ie.maximize() ie.text_field(:name, "login").set("login") ie.text_field(:name, "passwd").set("password") ie.button(:value, "Sign In").click() puts "## Checking the mail box" ie.button(:id, "checkmailbutton").click() # select first message. ie.radio(:id, "folderviewmsg0checkbox").set() # click on mark button so as options can be displayed ie.button(:value, "Mark").click() # select element that has text "Mark as Read" element = ie.element_by_xpath("//li[contains(.,'Mark as Read')]") # Print properties of the element just to make sure you selected correct element element.value element.tagName element.innerHTML # fire click event. element.click() end _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general