I have a tree view that looks like this (this is in the left frame on the page):
 
- ACME
  + Mexico
  + US
  + International
 
Now, as the mouse hovers over any of these words, various images appear beside the words (for edit, or for adding items to the list).  
 
The list of images with the same names is many (the current page shows 82 images, 12 of which is shown in the output below).
 
irb(main):104:0> ie1.frame("treeView").show_images
 
image: name:
         id:
        src: http://demo.abcd.com/images/icons/minus.gif
      index: 1
image: name:
         id:
        src: http://demo.abcd.com/images/icons/edit.gif
      index: 2
image: name:
         id:
        src: http://demo.abcd.com/images/icons/add.gif
      index: 3
image: name:
         id:
        src: http://demo.abcd.com/images/icons/plus.gif
      index: 4
image: name:
         id:
        src: http://demo.abcd.com/images/icons/ledger.gif
      index: 5
image: name:
         id:
        src: http://demo.abcd.com/images/icons/edit.gif
      index: 6
image: name:
         id:
        src: http://demo.abcd.com/images/icons/add.gif
      index: 7
image: name:
         id:
        src: http://demo.abcd.com/images/icons/plus.gif
      index: 8
image: name:
         id:
        src: http://demo.abcd.com/images/icons/edit.gif
      index: 9
image: name:
         id:
        src: http://demo.abcd.com/images/icons/add.gif
      index: 10
image: name:
         id:
        src: http://demo.abcd.com/d.gif
      index: 11
image: name:
         id:
        src: http://demo.abcd.com/images/icons/portfolio.gif
      index: 12
 
How can we achieve the following:
 
click on the add.gif that corresponds to the entry opposite ACME - we can't rely on the index number because the index number varies as users delete and
add menu items.  
 
Here's a snippet of the relevant html:
 
<DIV class=\"\"><A title=ACME href="" title=\"edit node\" height=16 src="" width=16>
<IMG title=\"create child node\" height=16 src="" width=16></DIV>
 
An obvious approach is to locate the ACME word in the html output and then find the index of the add.gif image, and click that, 
but I don't know how to do that?
 
Thanks for any guidance,
Sanju.

 


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/313 - Release Date: 4/15/2006

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to