We have an application that built on Angular. Our Performance team using HP LoadRunner TruClient with XPATH. This is fast developing application, and new features keep being adding, requiring changes to the testing XPaths.
Since we know that Angular doesn't need of element ID and they have asked us to add XPATH specifically for the performance script.
The current team is using XPATH like below,
//*[@id="addressAddBtn"]
This approach is so fragile since we are using Angular with PrimeNG. And if there is any upgrade and change in the application. They are facing lot of XPATH change and Their scripts completely breaks.
What would be best approach for this scenario instead of XPath?
I have seen those link they have mentioned about XPATH with Selenium and not sure on the HP LoadRunner TruClient.
Which is the best way to locate an element in selenium webdriver other than XPath?