I think I tried to do this years ago, but found it to be too difficult. How
would you do it?

Bret

On Thu, Jul 7, 2011 at 10:17 AM, Jarmo <[email protected]> wrote:

> Hi!
>
> Currently if there's some elements which doesn't exist, but will exist
> after some time (for example, after some ajax request), then i have to
> do something like this:
> browser.wait_until {div(:id => 'doesntexist').span(:class =>
> 'doesntexisteither').exists? rescue false}
> or
> browser.wait_until {div(:id => 'doesntexist').exists? && div(:id =>
> 'doesntexist).span(:class => 'doesntexisteither')}
>
> I don't like much both of the ways and started thinking that what if
> #exists? returned a boolean all the time? What if it returns false if
> the parent element doesn't exist instead of raising that unneeded
> exception? Since this would be a core change, i'd like to know what do
> you think and/or how do you handle situations like these in your
> tests?
>
> How does watir-webdriver handle these situations?
>
> Jarmo
> _______________________________________________
> Wtr-development mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-development
>



-- 
Bret Pettichord
Director, Watir Project, www.watir.com

Blog, www.testingwithvision.com
Twitter, www.twitter.com/bpettichord
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to