Hi All,

I have a problem with getting handle of a popup window.

I use Ruby 185-21
Watir 1.5.1.1145
Watir is installed with gem install watir on Ruby and directory looks 
like:C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1145

Popup window is written in JavaScript: <SCRIPT LANGUAGE="JavaScript" 
TYPE="text/javascript">

I run a script to get handle of a popup window and "puts" handle number to cmd.

require 'watir/contrib/enabled_popup'
puts 'look for handle'
hwnd = $ie.enabled_popup(10) 
puts 'got handle' + hwnd

Watir fails to get handle and exits from the script before puts 'got handle' + 
hwnd.
In cmd I receive the following info:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir/waiter.rb:55:in `wait_un
til': Timed out after 10.5 seconds. (Watir::Exception::TimeOutException)
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:208:in `
until_with_timeout'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir/contrib/ena
bled_popup.rb:10:in `enabled_popup'
        from C:/Watir/new2.rb:47

Please advise.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6262&messageID=17613#17613
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to