ie.div(:text, 'TEAM A').image(:index, 1).click

I'm not 100% sure this will work in 1.4.1, but it will work in HEAD.

Bret

At 04:27 AM 9/27/2005, Padraig O'Leary wrote:

>Hi all!
>
>I have a problem with a tree view with which I would really appreciate any 
>help that you could provide: The name, src and id attributes of an image I 
>want to click all contain the same data. The only thing identifying the 
>images is the text beside them.
>
>So, I can expand the parent node of the tree, but I cant identify any of 
>the child nodes.
>The HTML is as follows for the child nodes:
>
><DIV><INPUT type="image" src="childNode.gif"  id="childNode" 
>name="childNode">Team A</DIV>
><DIV><INPUT type="image" src=" childNode.gif"  id="childNode" 
>name="childNode">Team B</DIV>
><DIV><INPUT type="image" src="childNode.gif"  id="childNode" 
>name="childNode">Team C</DIV>
>
>Is there any way I can identify the image by the text beside it?
>
>Can Watir navigate the DOM? If I can identify the parent DIV node, is 
>there any way I can tell it to access the first child node of the parent node?
>
>Thanks for all your help in advance
>_______________________________________________
>Wtr-general mailing list
>[email protected]
>http://rubyforge.org/mailman/listinfo/wtr-general

_____________________
  Bret Pettichord
  www.pettichord.com

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

Reply via email to