I have a table on a page where I get links dynamically appears when I do an action in the application. The links have the same name. How do I click on the latest link?
It has div class = scrollable-table
and then there is Id for each element under this.
I tried
public static final Target theLatestLink = Target.the("latest link").
locatedBy("//*[contains(@id,'table-data')][last()]")
But this always click on the first link for some reason. What am I doing wrong?