Duplicate links in the web page

Hi,

I have duplicate links in the webpage as I attached below (ex. Building
Address). When I looked at the html source/through developer tool bar, I
found the below attributes for each “Building Address” link.

How I can click on the Building Address under Location 1 and Building
Address under Location 2 with the below attributes. How to write in the
ruby page file ?

Please find the attachment for reference(duplicate_links.jpg)

Below is the html source for Building Address link under Location 1:

AnchorIndex: 4
title: Enter Building Address
text: Building Address

id:
anchoridpyWorkPage.ProductData.Component(Location).OptionData(1).Component(BuildingInfo).OptionData(1).Component(BuildingAddress).OptionData(1)

onclick:
displayDetail(“pyWorkPage.ProductData.Component(Location).OptionData(1).Component(BuildingInfo).OptionData(1).Component(BuildingAddress).OptionData(1)”,“LocationDetails”,“RIGHTPANEL”,“pyWorkPage.ProductData.Component(Location).OptionData(2)”)

Below is the html source for Building Address link under Location 2:
AnchorIndex: 12
title: Enter Building Address
text: Building Address

id:
anchoridpyWorkPage.ProductData.Component(Location).OptionData(2).Component(BuildingInfo).OptionData(1).Component(BuildingAddress).OptionData(1)

onclick:
displayDetail(“pyWorkPage.ProductData.Component(Location).OptionData(2).Component(BuildingInfo).OptionData(1).Component(BuildingAddress).OptionData(1)”,“LocationDetails”,“RIGHTPANEL”,“pyWorkPage.ProductData.Component(Location).OptionData(2)”)