I've managed to solve my problem by pathching Watir.
I've copied code of click method and commented WaitForIE line and my script
now works fine
Perhaps someone might think of adding this into official version
# This method clicks the active element.
# raises: UnknownObjectException if the object is not found
# ObjectDisabledException if the object is currently disabled
def click_nonblocking()
object_exist_check
object_disabled_check
highLight(:set)
@o.click()
[EMAIL PROTECTED]()
highLight(:clear)
end
----- Original Message -----
From: "Miroslav Rajcic" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, December 08, 2005 12:34 PM
Subject: Re: [Wtr-general] Non-blocking image click
> Thanks, I've managed to install watir 1.4.1 using the gem tool,
> but unfortunately, my problem still persists.
>
> So my question is this:
> How do the rest of you handle problem of the file download links ?
> Is there any workaround way to prevent eternal blocking ?
>
> Regards,
> Miro
>
> PS. Watir seems cool tool for website regression testing, but I would like
> to see
> some faster methods (I am using WinClicker::getWindowHandle) to search for
> popup window (perhaps a method that restrict searching only to the popups
> that are children of a given IE object). Or perhaps such
> method already exists ?
>
>
> ----- Original Message -----
> From: "Zeljko Filipin" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Thursday, December 08, 2005 12:06 PM
> Subject: Re: [Wtr-general] Non-blocking image click
>
>
> > I can not help you with your problem, but I installed 1.4.1 watir gem a
> few
> > days ago. Try (in command prompt):
> >
> > gem install watir
> >
> > By the way, it is nice to know that I am not the only one from Croatia
> using
> > watir. :)
> >
> > Zeljko
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Miroslav Rajcic
> > Sent: Thursday, December 08, 2005 11:40 AM
> > To: [email protected]
> > Subject: [Wtr-general] Non-blocking image click
> >
> > I am having a problem with clicking the image that is a link for a file
> > download.
> >
> > In my code I start a separate thread to handle File Save dialog (using
its
> > own WinClicker object) and it works OK, but the problem is that the main
> > thread blocks forever in the image click call and I never see text
"After
> > call"
> > (see code below)
> >
> > It seems that image click from below is execute nicely because fiel save
> > dialog is triggered (and handled),
> > but as the IE page was not changed, my IE object blocks forever in the
> click
> > handler.
> > Sending Ctrl+C to the console reveals that it sleeps in waitForIE in
click
> > handler.
> >
> > Does anyone know how to handle this properly in non-blocking mode?
> >
> > (BTW, I am using Watir 1.31 because Watir 1.41 exe installer is broken
> and
> > the Watir 1.4 zip installer breaks with "C:/Program
> > Files/Watir/install.rb:16: uninitialized constant Fox")
> >
> > TIA,
> > Miroslav
> >
> > CODE:
> > --------------------------------------------
> > # click nth image with given src (src, idx) where idx starts from 1
> > len = ie.images.length()
> > counter = 0
> > for x in 1..len do
> > if ie.images[x].src == src
> > counter = counter + 1
> > if counter == idx
> > ie.images[x].click
> > puts "--------- After click"
> > end
> > end
> > end
> >
> >
> > _______________________________________________
> > Wtr-general mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> > _______________________________________________
> > Wtr-general mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general