[Wtr-general] Automation annoyingness

Bret Pettichord bret at pettichord.com
Wed Jun 7 21:35:52 EDT 2006


On 6/7/06, Lonny Eachus <lonny at titanez.net> wrote:
>
> By automatically, I would hope you mean a kind of "wait_for()" method,
> rather than doing it unseen in the background. At first thought it seems the
> latter would be terribly inefficient, especially since it is only necessary
> in relatively rare cases.
>

No i meant automatically, all the time.

What it would mean is that whenever Watir failed to find an object, it would
sleep for a fraction of a second and then try again if the timeout interval
hadn't yet been exceeded. If the timeout were set to 0, it should behave
exactly as it does today, so you wouldn't need to replace code.

In my spike, the core test suite, which normally runs in 120 seconds, ran in
142 with the timeout set to 0. And it represents a worst case, since it
includes lots of negative tests -- a lot more than any regular test suite or
scaper application would include. And in any case, i can't explain why it
took an extra 22 seconds -- so that is a bug i'd have to track down before i
would commit the code.


> Time and efficiency are definitely a concern in our screen scrapes. I was
> already considering overriding existing delays in the code. If this loop
> were done every time, we would likely be in the position of having to go
> into the Watir code to take it back out, in order to regain what efficiency
> we could.
>

Please let us know where you think Watir is inefficient. Like i said the
other day, i'm always tweaking things to make my tests run faster. If you
have suggestions, i'm all ears.

Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060607/5ee7c473/attachment.html 


More information about the Wtr-general mailing list