Chad Kanotz (ChadK854)

ChadK854 Member since 2014 1 post
Posted: March 18, 2015
Last activity: March 23, 2015
Posted: 18 Mar 2015 14:10 EDT
Last activity: 23 Mar 2015 8:26 EDT

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?

DevOps Testing Applications
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Discussion, please write a new Discussion.