Dashboard > Selenium > Home > Multiple links with the same name on a page
Selenium Log In View a printable version of the current page.
Multiple links with the same name on a page
Added by akulka, last edited by akulka on May 02, 2007
Labels: 
(None)

I need help to differentiate between multiple links with the same name on a page in Selenium IDE. I need to click on the third link on the page. Selenium IDE records it as a reference with session ID and timestamp:

selenium.click("//a[@href='http://[blah-blah-blah]3D&time_stamp=1178132536869']");

This line does not work when I try to re-run the test.

What would you recommend to use in this situation?

You could try a different XPath. An easy way to get one is from Firebug. After you install and enable the Firebug extension, you

1. right-click on the link you want
2. select Inspect Element
3. in the Firebug frame, right-click on the highlighted element
4. select Copy XPath
5. paste into the Selenium IDE target

Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators