Carl, This works for me (after you put your login and password ;).
require 'firewatir' include FireWatir ff=Firefox.new ff.goto("http://mail.yahoo.com") ff.text_field( :name,"login" ).set("<PUT LOGIN HERE>" ) ff.text_field( :name,"passwd" ).set("<PUT PASSWORD HERE>" ) ff.button(:value, "Sign In").click #ff.cell(:xpath, "//td[contains( text, 'New')]/").click ff.link(:text, "Sign Out").click ff.close Thanks, Al Snow Linkedin: http://www.linkedin.com/in/alsnow Google Talk: jasnow1 Twitter: jasnow > Date: Thu, 9 Apr 2009 11:32:56 -0700 > Subject: [wtr-general] Re: Yahoo mail, creating a new email message. > From: carlboudreau...@gmail.com > To: watir-general@googlegroups.com > > > I am new to this Watir, and having some difficulty figuring this out. > > I thought I would be starting something easy, by logging into Yahoo > and then creating a new email. However I can not get the Xpath line to > work. > > #Include the FireWatir file. > > require 'firewatir' > > #include the FireWatir Module. > > include FireWatir > > ff=Firefox.new > > #Open yahoo mail. > > ff.goto("http://mail. yahoo.com") > > #Put your user name. > > ff.text_field( :name,"login" ).set("username" ) > > #Put your password. > > ff.text_field( :name,"passwd" ).set("password" ) > > #Click Sign In button. > > ff.button(:value, "Sign In").click > > # Locate the table cell element on the page. > > ff.cell(:xpath, "//td[contains( text, 'New')]/").click > > #Click Sign Out button. > > #ff.link(:text, "Sign Out").click > > #Close the browser. > > #ff.close > > > > > > _________________________________________________________________ Rediscover HotmailĀ®: Get e-mail storage that grows with you. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---