I had the same problem with the controller I used before Watir. If I
remember it was caused by the page loading faster than we could detect, so
the wait method is still waiting, as it doesnt realise its already loaded.
This was one of the reasons I wanted to move to an event based system (
which caused way too many problems with IRB)
 
 
If you feel like trying something, in watir.rb in the wait method, try the
following
 
 
                log "wait: readystate=" + @ie.readyState.to_s 

                puts "Readystate = " + @ie.readyState.to_s   # new line
 
                until @ie.readyState == READYSTATE_COMPLETE
                    @pageHasReloaded = true
                    sleep 0.02
                    s.spin
                end
                sleep 0.02
                
                puts "Readystate = " + @ie.readyState.to_s   # new line
                puts "doc Readystate = " + @ie.document.readyState.to_s   #
new line

                until @ie.document.readyState == "complete"
                    sleep 0.02
                    s.spin

                end

       I think there is already a bug in to be able to specify a maximum
wait time
 

-----Original Message-----
From: Daniel Kurtz [mailto:[EMAIL PROTECTED] On Behalf Of
Daniel Kurtz
Sent: 27 July 2005 14:09
To: [email protected]
Subject: RE: [Wtr-general] Script non-responsive


Actually, when I was going back to it earlier today, I couldn't get it to
work in IRB either. I have the same problem whether I'm using button.click
or form.submit. The browser does what I want it to do, but IRB just sits
there with a blank prompt until you hit Ctrl-C.

 
Daniel Kurtz
Consultant
Olenick & Associates
205 W. Wacker Drive
Suite 2010
Chicago, IL 60606
312-332-0096
www.olenick.com

  _____  

From: [EMAIL PROTECTED] on behalf of Mike
Sent: Wed 7/27/2005 2:15 PM
To: [email protected]
Subject: Re: [Wtr-general] Script non-responsive



Running fine in IRB but not in a script strongly indicates a race.  I've
already encountered one of these myself, and I'm brand new to this.  You
might try strategically adding a sleep anywhere you think that javascript
may be altering your html.  Show_all_objects can be used to make sure what
you think is there really is.  (It can also function as the "sleep".)  The
button may not even be part in the real problem. 

 

<<attachment: winmail.dat>>

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to