Clicking on a link via selenium
Then you can try something like this.
for (int i=0; i<td.length(); i++){
driver.find_element_by_xpath("(//a[contains(text(),'Details')])[i]").click()
}
You can use find_element_by_link_text
:
For example:
link = driver.find_element_by_link_text('Details')
To Click on it, just call click method:
link.click()