I am planning to add multiple attribute support to Watir. For example:

  ie.div(:class => "MenuItem", :text => "Pulverize").click

The old syntax would continue to be supported.

  ie.div(:text, "Pulverize").click

Moreover, you could now also specify single attributes using this new
"hash" syntax. Thus:

  ie.div(:text => "Pulverize").click

These would allow any types of attributes to be mixed. In the case of
":index", the index would apply last. Therefore

  ie.div(:class => "MenuItem", :index => 3).click

Would click the third div on the page whose class=MenuItem. In effect,
set of attributes would have an :index of 1 unless something else were
specified.

Comments?

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

Reply via email to