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