Hi Ujjwal, you can use following code snippet to click a link by its href value:
public void clickLinkByHref(String href) {
List<WebElement> anchors = driver.findElements(By.tagName("a");
Iterator<WebElement> i = anchors.iterator();
while(i.hasNext()) {
WebElement anchor = i.next();
if(anchor.getAttribute("href").contains(href)) {
anchor.click();
break;
}
}
}