Jeff Fry wrote: > I'm left hoping we can find another way for me to learn what's been > added but not documented in v1.5. So Brett, Charley, Paul, or others > involved in building v1.5...if you were going to update the rdoc, how > would you know what to edit? If you were going to be making the edits > yourself, what parts are most time consuming for you? Would it be > worth your time come up with a rough list of things that need > documentation and pass that to someone else to document? Or does > generating that list constitute the bulk of the work, after which > there's not much point in delegating the writing? Alternately, is > there a way that you could teach me to generate that list of things > that needs documenting? In my view, the purpose of the rdoc is to provide detailed documentation of methods and classes. To the degree that we need good overview documentation (which we certainly do need), to me it is open question whether you put that in a users guide separate from the rdoc or in the header of the rdoc. Right now, the main file is pretty bad. It pulls in a todo list and yet omits the version number. So there are a lot of rather obvious changes that need to be made. Obvious to me at least, but i think that any one who looks at other well-documented Ruby packages (Rspec is another good example) will come to some quick conclusions. > One specific example - how can I determine what methods can take > :class as a parameter? I know that this works for button, text_field > and div...but is there a way I can find out what other methods take > :class via searching source code in eclipse? I just tried reading & > searching watir.rb for clues...but I got lost. Excellent question. I suggest that you focus on questions like this and then help us figure out the best way to document the answers. To me it is unclear whether it would be better to try and get the rdocs to include this information, or whether it would simply be easier to create a big table in the wiki. Please do what you think is easiest and clearest.
Now to answer your question. First of all, the "how" symbols that you can use to specify an element actually directly correspond to the zero-argument methods for the Element class. (This relationship is new to Watir 1.5 -- it was much more hard-coded in 1.4). If you look at the Element class, you will see that it supports the "class_name" method. That means you do ie.button(:class_name, 'foo') to specify a particular button by class. The reason this method isn't just "class" is because that is a reserved method name in Ruby. But what we did is provide a direct (hard-coded) mapping from the :class symbol to the "class_name" method in the locator method. Bret _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general