hi angrez the following is the script and the version i am using is watir
1.5.1.1158.gem
require 'watir'
include Watir
require 'test/unit'
class TC_mail_yahoo_check < Test::Unit::TestCase
puts "## Opening the Mail.Yahoo.com site"
sleep 1
ie = IE.new
ie.goto("http://mail.yahoo.com")
ie.maximize()
puts "## Login and Password Entered"
sleep 1
ie.text_field(:name, "login").set("username")
ie.text_field(:name, "passwd").set("password")
ie.button(:value, "Sign In").click()
puts "## Checking the mail box"
sleep 1
ie.button(:id, "checkmailbutton").click()
# select first message.
puts "## Selecting the First Mail"
sleep 1
ie.radio(:id, "folderviewmsg0checkbox").set()
# click on mark button so as options can be displayed
puts "## Clicking the Mark Button"
sleep 1
ie.button(:value, "Mark").click()
# select element that has text "Mark as Read"
element = ie.element_by_xpath("//lihttp://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()
puts "## Element ended"
sleep 1
end
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general