I am trying to grab a dynamic element with an incremental number in the XPath.
Here is the HTML of the element that I am trying to find:
<a class="delete_link" data-hide-id="list_169" data-delete-action="/panel/menuitem/menudelete/id/169" href="#">Delete</a>
Here is my code:
driver.findElement(By.xpath("//*[@id=list_"+pageID+"")).click();
where pageID is the string number following "list_"
I cannot seem to get the syntax right for it to find this element. I would normally just find it by ID, but this element doesn't have a normal ID identifier as you can see.