X-Paths are accurate, indeed. However, they are also very fragile. Any change to the website that moves things around has the potential of breaking your tests. IDs are by far the least fragile, since it doesn't matter if your changes to a , your tests will always find it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…