On 10/19/05, Angrez Singh <[EMAIL PROTECTED]> wrote:
> Hi Mike,
>
> What I think is the code that you are using for clicking the link will
> always return you the Home Link.
> Your HTML code is like this:
>
> > <tr>
> > <td class="false" height="20"><a
> > href="javascript:treeAction("my_tree#MA", "n=0000")
> > <img height="8" width="8" src="images/plus.gif" border="0" alt="Expand
> Root Node"></a>Home Node</td>
> > </tr>
> > <tr>
> > <td class="selected" align="left" height="20"><a
> > href="javascript:treeAction("my_tree#MA", "n=0001")
> > <img height="8" width="8" src="images/plus.gif" border="0" alt="Expand
> > Node"></a>Start Node</td>
> > </tr>
> >
> Your watir code is:
>
> > ie.link(:url, /treeAction/).click
> > ie.link(:url, /treeAction/).click
> >
> The above code will always return the first link whose url matches the
> regular expression /treeaction/. You can check this by printing the 'href'
> of the link on the console. You'll never be able to click on Start Node link
> using this code. Either you specify all the full href that distinguishes
> both the links or use 'text' attribute to get the link.
>
> HTH,
>
> Regards,
> Angrez
>
Yeah, ok, I can see that being the case. The thing that I'm a little
confused about is the fact that, in Watir, I basically did something
like this:
(1..40).each { |i|
ie.link(:index, i).flash
}
and while a ton of other stuff flashed, the "Start Node" never did.
Aside from that, how would I get a list of all of the treeAction
hrefs? There isn't a usable :text value to use. The value of :text
would actually be "Start Node" rather than the little plus image, and
clicking "Start Node" takes me to a page that is irrelevant for my
purposes right now.
Thanks very much for your thoughts.
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general