I also think it's a great idea. I remember talking about it with Bret at one point, and it was more challenging than it seemed at first glance. I've also had to do the wait_until blocks with rescue for Ajaxy pages. exists? should not explode imho.
Cheers, Charley On Thu, Jul 7, 2011 at 10:16 AM, Jarmo <[email protected]> wrote: > Haven't digged into technicalities yet. Just wanted to make sure that > this behavior would make sense to everyone else too before starting to > spend time on it. > > Jarmo > > On Thu, Jul 7, 2011 at 7:13 PM, Bret Pettichord <[email protected]> > wrote: > > 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 > > > _______________________________________________ > Wtr-development mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/wtr-development >
_______________________________________________ Wtr-development mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-development
