For vapir, I am pondering on deprecating usage of :index in a hash of attributes specifying an element. I'm looking to get reactions on this idea from watir devs.
Basically, when using a hash, :index is a special case and is extracted from the attributes hash. I'd prefer not to have that one hash key treated differently from every other, and I think that the alternative I propose (below) is more elegant all around. I would replace this functionality with index being specified as a subscript of element collections. That is, instead of: container.element(:class => 'some class', :index => 2) you'd do: container.elements(:class => 'some class')[2] The latter is already supported in vapir's master, though not yet released as a gem (due to difficulties with some cases of subscript being 0-indexed, when Array is returned, and some being 1-indexed where an element collection is returned). Thoughts? -Ethan
_______________________________________________ Wtr-development mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-development
