On Thu, Jan 20, 2011 at 1:01 PM, vishnu <path...@gmail.com> wrote:
>
> Another idea I had was to in a wait block
> attachEventListener to document load a function of the form
> setTimeout(0, function(){}) and my attached function would set some
> element on the page and use watir to check for this element. This way
> the element I attach will eventually exist on the correct page or on
> any of various error pages.
> What do you think of this approach? Are there some pitfalls I'm
> missing? If it seems that this too is likely to fail, then I'll just
> poll for the elements I expect on the success page as you suggest.
>

Absolutely - if you're able to change the application under test to
provide hooks for the test code to let it know when it's finished,
that's a good solution. From the Ruby side you're still polling the
state of the DOM, but you have more control.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to