I have a similar problem - that program that does a ie.link().click
that brings up a File Save Dialog never resumes.

I've tried threads, and system calls to run the Autoit stuff, but the
only way I can automatically fill in the File Save Dialog is to run a
separate autoit ruby program from the command line.

Then after autoit fills in the dialog, and the file is saved, the
original ruby program that got to that point is hung, still on the
ie.link().click.  It never resumes once the dialog is gone.

It's really frustrating.

johnk

On 7/21/06, John Fitisoff <[EMAIL PROTECTED]> wrote:
> <<The problem we're running into is that some of the
> pages we access occasionally NEVER finish loading.>>
>
> Yup. I'm working on multithreaded tests and that seems
> to happen (not a lot, but then it doesn't have to
> happen a lot to mess things up). You can use Ruby's
> timeout library to set a timeout value for an action
> or series of actions and then rescue the timeout
> exception when it occurs. something like the example
> below should work. But someone else out there may have
> a simpler way of dealing with it.
> ----------------------------
>
> require 'watir'
> require 'timeout'
> include Watir
>
> ie = IE.new
>
> def timeout
>   begin
>     timeout(120.0) do |timeout_length|
>       ie.goto("www.yoursite.com")
>     end
>   rescue Timeout::Error => e
>     puts e
>     ie.close
>   end
> end
>
>
>
> --- Steve Tangsombatvisit <[EMAIL PROTECTED]> wrote:
>
> > Hi folks,
> >
> > Relatively new to using Ruby/Watir...  I have a
> > quick question about the ie.goto statement, is there
> > a way to set a timeout for this call so that if the
> > webpage does not complete loading with X amount of
> > seconds the call terminates?
> >
> > The problem we're running into is that some of the
> > pages we access occasionally NEVER finish loading.
> > On the IE status bar (bottom left) we'll see a
> > message that says "Opening Page XXXX" or " (1 Item
> > Remaining) Opening Page XXXXX" and that message will
> > persist forever (as far as we can tell)... So our
> > scripts are hanging at the ie.goto call cause the
> > page never loads completely.
> >
> > Any tips you guys can give me?
> >
> > Thanks,
> > Steve>
> _______________________________________________
> > Wtr-general mailing list
> > Wtr-general@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>


-- 
Compare New & Used Networking Equipment
http://routercomp.com
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to