[Wtr-development] automatic waiting?
bret at pettichord.com
Sun Oct 17 21:33:12 EDT 2010
I'd like to see a more detailed proposal for this.
Also I remember someone -- I think it was Jari -- showing me some code
recently to implement the functionality you discuss here by adding an
I don't remember the exact name, but it did an implicit wait for the element
before calling the chained method ("click" in this case). If someone could
share the code for that I think it would help this discussion.
On Sun, Oct 17, 2010 at 7:11 AM, Jarmo <jarmo.p at gmail.com> wrote:
> I have been thinking about making Watir wait automatically before
> throwing Exceptions. I don't know how you are dealing currently with
> using some wait_until or similar solution. It has happened quite often
> that i create a test and it's ok, but then at some CI machine it fails
> intermittently and i end up inserting some wait_until in between
> assertions or anything else.
> or change the DOM. All these things are not blocking #wait if i'm not
> possibility that there will be some random errors because Watir loads
> the page and thinks everything is ready and doesn't block in #wait
> anymore, but right then the redirect is issued and something might
> break or might not break - depending of the timing.
> So, i was thinking - why not add some 5-10 seconds wait_until into
> somewhere to not throw Exception right away if the object doesn't
> exist? Or if the object isn't visible? So, if the test is failing then
> it waits maximum of 5-10 seconds befor actually failing and if test is
> ok, then it doesn't add any extra waiting time. And there's no need to
> put all those wait_until's into every here and there. If there's some
> longer Ajax call or anything then you can still use a wait_until in
> your test with longer timeout. So it shouldn't break any backwards
> compatibility either.
> What do you guys think? Is there any reason why not to implement
> something like that?
> Wtr-development mailing list
> Wtr-development at rubyforge.org
Lead Developer, Watir, www.watir.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Wtr-development