HI: I want to test a dialog.rb function ,my test program as follow: require 'watir' require 'watir/dialog' require 'test/unit'
class Dialtest < Test::Unit::TestCase include Watir def setup $browser=IE.new $browser.goto 'file:///C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/unittests/html/JavascriptClick.html' end def teardown end def test_dialog puts "hello\n" $browser.button(:id, 'btnAlert').click_no_wait puts dialog sleep 3 # FIXME: need to be able to poll for window to exist dialog.button("OK").click end end when I run this script , a error occred: 1) Error: test_dialog(Dialtest): WIN32OLERuntimeError: unknown OLE server: `AutoItX3.Control' HRESULT error code:0x800401f3 无效的类别字符串 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/dialog.rb:34:in `initialize' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/dialog.rb:34:in `new' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/dialog.rb:34:in `click' dialogtest.rb:26:in `test_dialog' 1 tests, 0 assertions, 0 failures, 1 errors please tell me how to handle the problem? thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---