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

I do not understand the problem. Why not just alter the _javascript_ to reduce or eliminate the delay? You can make it do anything you want it to.

Lonny Eachus
=========



Subject:
[Wtr-general] Automation annoyingness
From:
Jared Quinert <[EMAIL PROTECTED]>
Date:
Wed, 07 Jun 2006 20:14:25 +1000

I have an issue which I suspect can only be solved elegantly by getting our dev team to make some changes to our application.  I suspect that the issue I'm having would be a general one with *any* tool attempting to automate a browser (hence my crossposting).

The issue is that there is _javascript_ attached to the 'next page' link.  This script takes some time to run before advancing to the next page.  Watir sensibly waits for IE to not be busy after a control is clicked, however, because the script is running, it looks like IE is not busy.  As a result, the script clicks on the link, then immediately checks for the elements on the next page.  They're not there, but Watir is tricked into progressing because IE is not loading a page.


_______________________________________________ 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

Reply via email to