I think the point is that any script activity after a click is non-instantaneous.  That leaves a window where your test script progresses, checks to see if IE is busy, and is told 'No, IE is not loading a page', but then a fraction of a second later, it may begin loading a page. 

The process is click, wait for IE, click, wait for IE.  If IE doesn't appear to be busy after the click, it will move on.  The small sleeps in Watir's wait method might be enough for most circumstances, but probably not all.

The actual call in our script is document.form.submit().  I don't know if there's any way to make IE report itself as busy.  If there is, that would probably fix things too.  Normally, IE is busy once you click a submit button. I don't if it is busy as soon as you call a form's submit method.  It seems hard to tell.

Jared


I thought you meant there was an explicit delay. While I do not doubt what you say, it seems strange that even a mess of _javascript_ should take very long. On the other hand, in recent months I have seen some _javascript_ that was, indeed, a real mess. Can you be more specific about what it is doing? There may be ways to optimize things on the _javascript_ side. If it is not relevant here, you can send to me directly at [EMAIL PROTECTED]

Lonny Eachus
==========

Subject:
Re: [Wtr-general] Automation annoyingness
From:
Jared Quinert <[EMAIL PROTECTED]>
Date:
Thu, 08 Jun 2006 09:31:15 +1000

In the real-world example the delay is caused by _javascript_ which is doing something necessary, not just pausing (as in my fake example).  Watir pauses for 0.2 seconds after a link is clicked, so this probably catches most instances where an application has some _javascript_ that does something computationally intensive before the next page is loaded.  I think this means that I have to explicitly handle this.  I was hoping to know what approaches others had taken. 

I figure this would confuse commercial tools as well, but don't have one to compare to, unless they're smart enough to analyse the script invoked to see if it actually submits a form, refreshes, or redirects to another page.  Even then, I can imagine issues.

Jared

_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general



_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to