This should work, right?
#########################################
popup_thread = Thread.new {
puts "entering popup thread"
sleep 1
@autoit = WIN32OLE.new('AutoItX3.Control')
@autoit.WinWait "", ""
@autoit.Send "{ENTER}"
puts Time.now
}
puts "clicking link"
puts Time.now
@ie.link(:id,"peskyPopupLink").click
popup_thread.join #JUST IN CASE
#######################################
popup_thread starts, returning control to the calling script
Watir clicks peskyPopupLink
popup_thread sleeps 1 second, cranks up AutoIt, attaches to top
window, and hits the default button.
But I don't think popup_thread ever completes. Output from this script is
Started
entering popup thread
clicking link
Thu Oct 20 11:53:51 Central Daylight Time 2005
leading me to believe that the "puts Time.now" in popup_thread is
never executed. Any suggestions as to what I've done wrong are
welcome...
-Chris
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general