[Wtr-general] IE.GoTo - Can You Set A Timeout or an Idle?
Bret Pettichord
bret at pettichord.com
Fri Oct 13 02:55:13 EDT 2006
Chris McMahon wrote:
> I had another thought, namely that calling goto() inside an explicit
> timeout is nicer than actually building a timeout value into Watir.
> There is a timeout value set in the Ruby http-access2 library and I am
> forever having to remember where the dang value is set and rejigger it
> on all of my test machines. Not to mention the heartbreak of when a
> long-running process terminates because I didn't set the timeout high
> enough, destroying some critical test or another.
I used to think we needed to add the timeout mechanism requested by the
original poster, but lately i've been more inclined to follow Chris's
thinking -- use Ruby for things that Ruby is good for and it already has
a general timeout mechanism.
My main reason for thinking it should be added to Watir is that it
really sucks when you run a large testsuite and then find out that one
of the early tests hung for a stupid or hard-to-reproduce reason and
then you have to re run it. The test harness itself really should know
to abort a hung test and move on to the next one. The problem is make it
smart enough to "know" when it is hung.
I would appreciate more comments on this topic. Clearly the timeout
functionality already exists. The question is how and whether to build
this into Watir or perhaps Watir::TestCase in order to help testers make
competent use of the tool.
I'd also like to whether there are any drawbacks to using plain
"timeout". I spent some time working on "until_with_timeout" as a Watir
method and never quite finished that because of these concerns.
Bret
More information about the Wtr-general
mailing list