Posted: 20 Nov 2019 5:40 EST Last activity: 22 Nov 2019 12:43 EST
Bluezone Mainframe Rematching
Currently, I'm trying to perform a detach/rematch logic for mainframe sessions to simulate a refresh action just like in web applications. However, after rematching the session for mainframe, rematching does not rematches the controls. It works on desktop applications though. Is this a bug or it has something to do with the emulator?
The scenario we are trying to resolve is if for some reason, the application hangs, we are gonna retry the waiting for controls but with increased timeout. But before doing that, we are trying to detach and rematch the adapter before trying to wait for the control again. Any other suggestions?
At the adapter level, there is a NewScreenShowing event that fires whenever a "new screen" is present. I cannot recall exactly how that works with the older version of BlueZone though since it really isn't telling Pega (via WHLLAPI) that a new screen is present. You can test that though and see when it fires. I believe it will always fire at the interval you set in the screen timeout I mentioned in the prior article.
It seems like an unnecessary step to timeout waiting and then just immediately continue waiting longer. Since a WaitForCreate returns once the control matches, why not just make that wait interval long enough to catch your hanging application? For example; if the next screen normally appears after ten seconds, but sometimes it takes five minutes, set the wait timeout to five minutes. When the screen appears in ten seconds, your automation will continue. When it appears in four minutes and fifty-nine seconds, your automation will continue. When your screen hasn't appeared within five minutes, you'll reach the timeout and can handle that error appropriately.