I believe what you are seeing is a problem that several of us are
seeing with click_no_wait.  The main symptom is that you see the
button or link flash but no popup comes up.  Since it works for some
of us with the same Ruby / Watir combination, I think it must be some
sort of system setting that is the difference.  You can find several
recent posts on watir -general about the problem.

If you can shed any light on this problem, a number of us would be
very grateful.

Jim


On Mar 5, 10:09 pm, kushnit <kush...@gmail.com> wrote:
> Hi,
>
> I am trying to run a watir script which is used to handle alert popups
> on eclipse. Its runnig smoothly on SciTE but wen i try to run it on
> eclipse its throwing a TimeOutException.Does anybody have solution for
> the same.
> Following is my program and respective error
>
> require 'watir'
> require 'watir/ie'
> require 'watir/contrib/enabled_popup'
> def startClicker( button , waitTime, user_input=nil )
>   # get a handle if one exists
>   hwnd = $ie.enabled_popup(waitTime)
>   if (hwnd)  # yes there is a popup
>     w = WinClicker.new
>     if ( user_input )
>       w.setTextValueForFileNameField( hwnd, "#{user_input}" )
>     end
>     # I put this in to see the text being input it is not necessary to
> work
>     sleep 3
>     # "OK" or whatever the name on the button is
>     w.clickWindowsButton_hwnd( hwnd, "#{button}" )
>     # this is just cleanup
>     w=nil
>   end
> end
> $ie = Watir::IE.new
> $ie.goto('d:/test_pop.html/')
> $ie.bring_to_front      #to bring the window in front
> $ie.maximize
> $ie.button(:value, 'Alert').click_no_wait
>
> The Exception thrown by the program is:
>
> C:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb:
> 59:in `wait_until': Timed out after 9.499 seconds.
> (Watir::Exception::TimeOutException)
>         from C:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
> waiter.rb:80:in `wait_until'
>         from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/
> enabled_popup.rb:10:in `enabled_popup'
>         from popup_test.rb:6:in `startClicker'
>         from popup_test.rb:25
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to