[Wtr-general] Automation annoyingness

Jared Quinert jared at kilmore.info
Wed Jun 7 19:31:15 EDT 2006


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 <jared at kilmore.info>
>> 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
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060608/075a057f/attachment.html 


More information about the Wtr-general mailing list