On Fri, Aug 14, 2009 at 5:49 PM, Michael Hwee<michael_h...@yahoo.com> wrote: > > : index=> 0 is not the last item. >
Well, that depends on how the 1-indexed Watir collections are implemented. :) The best solution for getting the last item in this case is: browser.links.select { |l| l.text == 'foo' }.last --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---