Pega generated HTML does not work well with selectors in automation
I have noticed that most of the UI elements that appear on our application pages do not have IDs, or have duplicate IDs, forcing me to construct relative-path queries in XPath or CSS to get to the control or text element in Selenium WebDriver. The problem with relative-path queries is that they are inherently unstable, and not even guaranteed to work. If anything changes on the page, it can disrupt code access to every element referenced using that method. In fact, there are some elements that are simply impossible to access.
Is there a way to modify the generated HTML so that it better supports test automation with IDs for the items we care about interacting with? Obviously, I don't want IDs on every HTML item, and I wouldn't want random IDs that change with every build.
The point is, Pega's lack of support for test automation best practices in HTML, such as IDs, is breaking my automation and creating a lot of false negative results.
Anyone have any suggestions?