I have a web application where there are two links with same name.
When i use
driver.findElement(By.linkText("Travel and Expense Center")).click();
i get error stating there is no webelement.
i tried using xpath
driver.findElement(By.xpath("//A[@class='PTNAVLINK' and @name='EP_SC_SP_EMPLOYEE_TE_CENTER']")).click();
for this also i am getting the same error.
the difference between the two links with same are their class property...