I'm voting to add this...I know I can add it myself, but it seems like
a number of people are having to do this already.
Jared
I
think the remaining question is whether Watir should do this
automatically. I've actually coded this directly and tested it and it
works. It's only a couple of lines of code.
The only complication is that if you do this on every call,
you need to make darn sure you put a limit on how long you will poll
for the existance of an object. What happens if the page changes and
the second page no longer has a link called "Second"? Dara's
solution would hang indefinitely, which is a bad thing for a test to
do.
So that means adding a timeout and then providing a means for users to
configure the timeout for their own tests.
Should we build this into Watir?
The main drawback is that every time there is a failure to find an
object, Watir will wait the timeout interval, before actually raising
the error. So it could make tests slower, especially when there are
lots of errors. On the other hand, you could just set the timeout to 0,
and then it would work the way it does today.
Comments?
Bret
_______________________________________________
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