Hi,

I have html code for my application where same DIV class and id for an
particular element is appearing twice.

or say in 2 places.

<DIV class=x-combo-list-item _nodup="30811" viewIndex="5">Files_Raj</
DIV>

<DIV class=x-combo-list-item _nodup="30811" viewIndex="5">Files_Raj</
DIV>

These are appearing twice, and having same class and index.

I have to select the last DIV not the first.

How can i acheive this.

I tried like this :

$_ = $ie.html
$b = $ie.html.scan(/<DIV class=(x-combo-list-item) _nodup="\S*"
viewIndex=\"\S*\">#{subfolders}<\/DIV>/).flatten
rowid = $b[-1].to_s
$ie.div(:class => rowid , :index => 5).click


But not successfull. it is not clicking the desired element as well as
not showing any error.

Can anyone know?

Bhavesh

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to