To locate an element we can use
the element’s ID
the element’s name attribute
an XPath statement
by a links text
document object model (DOM)
In practice, you will discover
id and name are often the easiest and sure way.
xpath are often brittle. for example you have 3 tables displayed but sometimes there are no data and the table isn’t rendered, your xpath locating the second table will not always return the intented one.
css are the way to go in conjunction of id and name !
locating links in an internationalized application is sometimes hard… try to use partial href.