Facing issue in running automation scripts on pega UI using HPE UFT v14
We use HPE UFT v14 to perform automation testing on PEGA UI. We are facing issue in running automation scripts on pega UI due to inconsistency in frame refresh in each page.
How UFT tool works is, it waits for browser ready status to make sure all the application elements are loaded before running the script. But if any real time frame refresh happens with the page (due to any service call to pega server), the tool doesn’t known if refresh is completed or not. Currently we are using hard wait statements to handle this refresh. Sometime due application/environment slowness if the refresh take more time to load our automation script will fail.
Is there any PEGA recommendation to handle this frame refresh?
Solution we tried,
We tried waiting for each fields to be visible using (visible property to True), but it didn’t work because during frame refresh the fields is already visible.
We tried putting hard wait time, It works for now, but fails if application/environment is slow to refresh.
We tried to entering other text fields while the frame refresh completes. This didn’t help because once the refresh is complete all the fields get cleared.
Screen shot attached to the post
Did anyone faced similar issue aware of a solution?
***Edited by Moderator Marissa to update SR Details***
There is an shipped document-statetracker <div> which can be used here. This div contains attribute called "data-state-busy-status" which changes from busy to none based on browser processing. As long as any processing happening with browser be it iframe refresh, ajax request or whole browser refresh the attribute will be in busy state. Once all the process is done from browser end it changes to none state.
Please use this attribute and wait until data-state-busy-status == none. This will handle all loading cases. This div is restricted by privilege called pxIsClientActivityTracking. Please add this privilege to your operators access role to get this div displayed in DOM. Below is example of how we use it in our selenium script. Please let us know if any further help is needed.
driver.find_elements(:xpath, '//div[@class="document-statetracker" and @data-state-busy-status="none"]').size == 1