popups_test.rb fails for me. js confirm never dismissed

9 views
Skip to first unread message

marekj

unread,
Mar 10, 2008, 7:37:33 PM3/10/08
to watir-...@googlegroups.com
Today I needed to implement click on 'OK' for confirm(); js dialog and the first thing I did was to look at unit tests.

the popups_test.rb hangs on my machine. the confirm dialog just sits there. Here is what I see in commandline

03/10/2008 18:04:21.39
C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.3\unittests>popups_test.rb
Loaded suite C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.3/unittests/popups_test
Started
Starting start rubyw C:\ruby\lib\ruby\gems\1.8\gems\WATIR-~1.3\watir\watir\clickJSDialog.rb OK 0.5

My longName is:
puts longName #=> C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.3\watir

additional info:
When I run clickJSDialog.rb by itself from commandline while the confirm(""); is showing then it closes it successfully

meta:
C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.3\unittests>ruby -v
ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32]
I am on WinXP sp2 with IE 6.0

popups_test here:
http://www.koders.com/ruby/fid34375828C9247BC6462603BF673400332FCA3E25.aspx

any ideas
thanks
marekj

marekj

unread,
Mar 11, 2008, 10:34:51 AM3/11/08
to watir-...@googlegroups.com
Hello, anybody else has problems with unitests/popups_test.rb?

I was finally able to dismiss my confirm(); dialog with threads but I would rather want the winClicker to work.

    threads = []
    threads << Thread.new { $ie.radio(:name, 'myradio', 'myvalue').set}
    threads << Thread.new { system("rubyw c:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\watir-1.5.3\\watir\\clickJSDialog.rb OK 5") }
    threads.each {|x| x.join}
Reply all
Reply to author
Forward
0 new messages