sir i tried this code :
require 'rubygems' require 'watir' require 'watir/ie' require 'watir\contrib\enabled_popup' require 'win32ole' $ie=WATIR.IE.new def check_for_popups(title="Microsoft Internet Explorer", button="OK") popup=Thread.new { autoit=WIN32OLE.new('AutoItX3.Control') ret=autoit.WinWait(title,"",60) if (ret==1) puts "There is popup." autoit.WinActivate(title) button.downcase! if button.eql?("ok") || button.eql?("yes") || button.eql? ("continue") autoit.Send("{Enter}") else autoit.Send("{tab}") autoit.Send("{Enter}") end elsif (ret==0) puts "No popup, please check your code." end } at_exit { Thread.kill(popup) } end $ie.goto('http://justaddwatir.com/watir/test_html/tc_0101_0200/ test_0107.html') $ie.text_field(:name,"text1").set("This is the text in the popup") $ie.button(:name,"submit").click check_for_popups("Microsoft Internet Explorer", "OK") but it is throwing these errors .pl help me resolve this code. >ruby testingpopup2.rb C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ dependencies.rb:443:in `load_missing_constant': uninitialized constant WATIR (NameError) from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/dependencies.rb:80:in `const_missing' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/dependencies.rb:92:in `const_missing' from testingpopup2.rb:7 >Exit code: 1 i am using ruby 1.8.6 release version,watir 1.6.2.. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---