On Fri, May 7, 2010 at 7:18 PM, Ethan <[email protected]> wrote: > On Fri, May 7, 2010 at 11:42, Jarmo <[email protected]> wrote: >> >> 1) Default locator for all elements should be :index => 0 > > Concur. I too am annoyed by having to type a bunch when I just want the > first element of the specified type. Same for IE.attach; if no :title or > :url specifier is given, it should just attach to the first IE it finds. + 1
>> >> And with the possibility (from Google Wave about Watir 2.0 by Jari) to >> use locators for collections: >> product = b.table(:id => "table_id").trs(:text => "Something else").first >> product.link.click > > Definitely. This is a priority for me in my fork. This is already done in Watir WebDriver. > >> >> 2) Selenium has a lot of different ways of locating elements... > > I'd limit this to just id. conflating it with name introduces significant > ambiguity, since the name of one element can be the same as the id of > another. Do we go with the first id that's found, or the first name, or the > first of either sort? The last seems most consistent with how watir operates > / returns things, but incurs a significant performance hit because you can't > use getElementById or getElementByName, because you won't know which element > comes first. I totally agree with you. Limit it to id since it should be unique within the page thus needing no special handling :) >> >> 3) Allow only hash syntax for element locators... > > Sounds good to me. > Not mentioned here, but in the same vein, the third argument (value) passed > to radio/checkbox should definitely be dropped. It is also already done within Watir WebDriver. Jarmo _______________________________________________ Wtr-development mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-development
