Are these two nodes connected to the same parent? If so, you can try one of them, depending on where they are under the parent in the DOM, and if there are any other elements:
selenium.Click("css=.contactName:nth-child(2)"); selenium.Click("css=.contactName + .contactName"); selenium.Click("css=.contactName ~ .contactName");
If these two nodes do not have the same parent, you will most likely have to use the XPath locator instead of CSS:
selenium.Click("xpath=//*[@class='contactName'][2]");
Boltclock
source share