I agree, but what I would suggest for the handling of dynamic content
is that, in the event that the block for an iterator causes a page
(re)load, that an exception should be thrown kicking things OUT of the
block ...

PageContextChangedError or something like that... 

that way you can iterate happily as long as you don't cause a load,
and if you do, you get kicked out of your iterator.

... makes sense to me. 

j.

On 8/3/05, Bret Pettichord <[EMAIL PROTECTED]> wrote:
> OK, well that means reworking the iterators -- i suggest we do this before
> creating more.
> 
> The problem with the current iterators is that they iterate over COM
> objects, rather than over, say Watir::TextField objects (which is
> implicitly what my example would require). This would require Wrapper
> objects, like those we already have for Form.
> 
> Personally, i think we should not be exposing COM objects, except as a
> 'back door' to let people muck with the iternals -- we should not be
> inviting people to mess with them.
> 
> (Another issue with Iterators is that they can only iterate over a static
> page. Thus the following code will fail
> 
> >   ie.buttons.each {| b | b.click if b.name == "foo" and b.title == "bar"}
> 
> because a new page will load after clicking the button, making the buttons
> iteration lose context.
> 
> Bet
> 
> At 08:09 AM 8/3/2005, Shao Kang Tat wrote:
> >+1 :)
> >
> >I'd also put in a request for table cells...sometimes I work with
> >tables that have more rows/columns than the row_count and column_count
> >say they do.  When I try a table[x][y].exists? I get an error
> >
> >
> >On 8/3/05, Bret Pettichord <[EMAIL PROTECTED]> wrote:
> > > At 10:42 PM 8/2/2005, Jeff Wood wrote:
> > > >Iterators on ALL of the browser objects would be good. (frames,
> > > >buttons, text_input,  images, etc. ).
> > >
> > > Most of these are already in place.
> > >
> > > I have a question of my own. Would you like to see kind of thing work?
> > >
> > >   target = nil
> > >   ie.text_fields.each {| tf | target = tf if tf.name == "foo" and tf.title
> > > == "bar"}
> > >   target.set("hooray") if target
> > >
> > > Bret
> > >
> > >
> > > _____________________
> > >  Bret Pettichord
> > >  www.pettichord.com
> > >
> > > _______________________________________________
> > > Wtr-general mailing list
> > > [email protected]
> > > http://rubyforge.org/mailman/listinfo/wtr-general
> > >
> >
> >_______________________________________________
> >Wtr-general mailing list
> >[email protected]
> >http://rubyforge.org/mailman/listinfo/wtr-general
> 
> _____________________
>   Bret Pettichord
>   www.pettichord.com
> 
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
> 


-- 
"So long, and thanks for all the fish"

Jeff Wood

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to