I think Jonathan has touched on the key element for a problem that Dmitri has also been running into...

On 2/13/06, Jonathan Kohl < [EMAIL PROTECTED]> wrote:
I figured out how to repeat the problem, and how to work around it.

If I enter in the test site as I do manually:
ie.goto("http://test-web")
The script dies because it tries to find an object before the page has
loaded. If I put the full path to the app:

ie.goto("http://test-web/cgi-bin/testapp.do")
it works. The first one worked before our new switching was put in the
office. " http://test-web" resolves to: http://test-web/cgi-bin/testapp.do.

Any thoughts?

I checked the IE#goto method and it calls IE#wait, but it is acting like it isn't actually waiting for the page to load. I think i know why. The body of IE#wait is wrapped in a begin/rescue/end block and this has always made me nervous. It's too easy to suppress important errors.

In your case (and Dmitri's), i'm willing to bet that @ie.document doesn't yet exist (so it throws a WIN32OLERuntimeError, which is silently suppressed, exiting the wait method BEFORE the page has even started to load!

I've been uncomfortable with this begin/rescue/end block, and now that i have good reason to take it out, i've done it. I've just committed this change and have also added an explicit wait for the @ie.document to exist.

The core tests run ok, but because we really don't have unit tests for the wait logic, there is a greater than usual chance that this introduces (or unblocks) other defects. Let me know of any problems.

Thanks for the detailed investigation and report.

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

Reply via email to