Try this (after adding your login and password.) -- Al require 'watir'
#include Watir Watir::Browser.default = 'ie' #ie = Browser.new ie = Watir::Browser.new #Open yahoo mail. ie.goto("http://mail.yahoo.com") #Put your user name. ie.text_field(:name, "login").set("<PUT YOUR LOGIN HERE>") #Put your password. ie.text_field(:name,"passwd").set("<PUT YOUR PASSWORD HERE>") #Click Sign In button. ie.button(:name,".save").click #Click Sign Out button. ie.link(:text, "Sign Out").click #Close the browser. ie.close On Feb 11, 5:23 am, Bill Xu <xulei8823...@gmail.com> wrote: > Hi Martin: > I am not sure whether it because you missed install process > c:\>gem install windows-pr > for more information please refer > tohttp://wiki.openqa.org/display/WTR/Install+Watir > Thanks! > Bill > > On Wed, Feb 11, 2009 at 4:58 PM, Martin <ninty...@163.com> wrote: > > > C:\>gem update --system > > Updating RubyGems > > Nothing to update > > > C:\>gem install watir > > Successfully installed watir-1.6.2 > > 1 gem installed > > Installing ri documentation for watir-1.6.2... > > Installing RDoc documentation for watir-1.6.2... > > > My script: > > require 'watir' > > include Watir > > Watir::Browser.default = 'ie' > > $ie = Browser.new > > #Open yahoo mail. > > $ie.goto("http://mail.yahoo.com") > > > #Put your user name. > > $ie.text_field(:name,"login").set("User_Name") > > $ie.text_field(:name, "login").set("User_Name") > > #Put your password. > > $ie.text_field(:name,"passwd").set("Password") > > > #Click Sign In button. > > $ie.button(:value,"Sign In").click > > > #Click Sign Out button. > > $ie.link(:text, "Sign Out").click > > > #Close the browser. > > $ie.close > > > When I run it, I got uninitialized constant > > Watir::Container::TextField (NameError). > > > Does anyone know what's wrong with my script? > > > Error Message: > > c:/rails2.1/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > > active_support/dependencies.rb:442:in `load_missing_constant': > > uninitialized constant Watir::Container::TextField (NameError) > > from > > c:/rails2.1/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > > active_support/dependencies.rb:77:in `const_missing' > > from c:/rails2.1/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > container.rb:275:in `text_field' --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---