We are currently using Selemium for the Automation test cases of PEGA Workflows. Currently its all working fine with PEGA 8.4.3 and after the PEGA upgrade of 8.8.3, lot of places it had the issue with the XPath changes.
Just want to understand what’s the recommended approach for the selemium scripts to identify each element in the UI ?
Do we need to use TestID which is present at each field ?
@satsihch Following are the few UI automation recommendations for applications built on Pega
Please use “data-test-id” for locating elements. The data-test-id’s are not expected to change unless you regenerate them. Please find the attached screenshot for sample data-test-id locator on DOM.
Please wait for the docstatetracker div whenever you are performing any ajax operations like on change-refresh section etc. This can be built in as a function in your current automation framework. Please refer Selenium interacting with Pega UI. Unable to consistently interact with elements | Support Center for more information. In Selenium Starter Kit, we have provided an out of the box function for this.
For radio buttons, you can use the data-test-id of the radio button group and then use the children label or input value to identify the elements.