Or, you could do it like this which is not so good anyway: ie.divs.find_all {|div| div.text == "div"}.last.click
Better add some id, name, class or whatever attributes to the divs to make it more robust and more readable. Jarmo On Jun 28, 11:31 am, Željko Filipin <zeljko.fili...@wa-research.ch> wrote: > On Fri, Jun 25, 2010 at 3:03 PM, Ajitesh Srinetra < > > ajitesh.srine...@gmail.com> wrote: > > Is there any way I can click on the last Index directly like > > ie.div(:text => 'div',:index =>Last).click > > I do not think we have something like that. > > Maybe you would be able to do it with xpath: > > http://wiki.openqa.org/display/WTR/XPath > > Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com