Hello Regina, at first I wasn't sure I had enough information to help, but then I noticed the "table" tags in your HTML code snip.  If I can make a guess, does the HTML page have a table with a bunch of similarly named links in the same column but in different rows?

If so, there are different solutions that you might try.  One way might be to try and access the link using the table's cell position.  For example, using something like:

> ie.table(:index, #)[row#][col#].link(:index, 1).click

(Replace the '#' with appropriate numbers.  This line will click the first link that it finds in that particular table cell.)

I had a similar problem accessing the links on one page of my AUT.  I wrote a routine that used arrays to look for a particular row that matched certain criteria and then it just clicks the link in whatever column number the link happens to be in.

See if that puts you on the right track.  If not, please provide some more background information - like the general layout of the html on the page or the code that you've tried that doesn't work.  I'd be happy to post my code if you need it, but I'd like to have a better idea that the particular problem that I solved for our app is similar to your situation.

Hope that helps.  Cheers.  Paul.


On 08/03/06, Rexhina Alickolli <[EMAIL PROTECTED]> wrote:

I am new in Watir/Ruby and I am trying to figure out how do distinguish links of the same name.

Now, if I want to click on that link I just do that by name, but that prevent me from accessing all of them. I can perform the Click action only in the first link. The code behind the link ("Add New Code") is:

 

      ……………………..id="_editTemplate__matter__status_hiddenButton" href="" style="visibility:hidden;"></a>&nbsp;<a id="_editTemplate__matter__status__ctl2_anchor" class="_javascript_Link" New Code</a></td></tr></table>

 

Any suggestion would be appreciated.

Thanks-- regina


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

Reply via email to