Also, if I recode it like this:
===
require 'watir'
require 'test/unit'
class TC_article_example < Test::Unit::TestCase
        def test_search
  # open the IE browser
  ie = Watir::IE.new
  # steer to google
        ie.goto('http://www.google.com/')
  # load the search field
        ie.text_field(:name, "q").set("pickaxe")
  #Ensure popup won't block Watir
  ie.button(:name, "btnG").click_no_wait
  #Handle the popup
     hwnd = ie.enabled_popup(5)
   if (hwnd) #yes there is a popup
     if (modal = ie.modal_dialog(:hwnd, hwnd)) #and if it is modal
       puts(modal.to_s)
       modal.button(:value, "Yes").click
    else
      wc = WinClicker.new
      wc.clickWindowsButton_hwnd(hwnd, "OK") #close nonmodal popup via handle
    end
  end
  # click search button
  ie.button(:name, "btnG").click
  # Validate response
  assert(ie.pageContainsText("Programming Ruby"))
  
  end
end
===
I still get this:
  1) Error:
test_search(TC_article_example):
NoMethodError: undefined method `enabled_popup' for #<Watir::IE:0x2764a60>
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=4012&messageID=11245#11245
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to