I want to automate a SAP process, where optionally popups appear, which I can close by sending the hotkey “enter”. There can appear one, two or a lot of popups.
Overall, the popups have three different titles, which I use to recognize them.
The popup with the title “RSQ(1)/100 Information” is also recongnized even if it is not visible and all popups are closed. In order to handle this, I used an “image exists” activity, which should recognize if this popup (only the blue part) really exists (see image).If both variables are true, the popup should be closed. The problem is, that if the popup is located e.g. 2cm higher on the screen, Uipath doesn’t find the image, even if it is visible. Does anybody know if Uipath only recognizes images at the same location and how it can be edited to find the image on the screen?
I have automated more then a few SAP processes. First of all, do you have GUI scripting enabled? The will allow you to use the selectors, which is way more stable then OCR. For me OCR is my last resort. Like you noticed yourself.
I also recommend using the Parallel activity when generating a report in SAP where pop ups may occur. You pack all of these sequences, one for each possible pop up, with the activities to close the pop up next to each other in the parallel, and add a find element or element exist into an extra sequence. The parallel will try close all pop ups at the same time while waiting for the report to load. If the report is loaded the element exist finds it and sets the closing criteria for the parallel. It’s just a tip.
But first try using a selector. And if you can’t, I would be interested why it’s not working.
as mentioned enable SAP Scripting, so you can rely more stable on he selectors.
For checking the display status you can do following:
check with element exists if the pop up exists
if it exists then with get Attribute on the Attribute relativeVisibility (cross check the spelling) it can be identified if its displayed or not
for reducing the checks the regex selectors are helping much
so with some shortened search keys e.g. an optional pattern can be defined: (.Information. | ABC.*)
with a retrieval of the title a more exact handling can be done e.g. with combination of switch activity
GUI scripting is enabled. I already tried parallel activity, but with element exists to recognize the popup. The problem here is, that for any reason the popup selector (with a different title than the sap modus) also matches the sap window. Thus, the selector also recognizes a popup, when there is none.
I don’t know if I got you right regarding the element exists activity. Unfortunately, my process only changes dates in SAP and doesn’t load any data report from SAP. Or is there any SAP report, which provides information when SAP is loaded?
I already thought about the bar at the bottom of the sap modus, but unfortunately it doesn’t show any info once all popups are closed.
I have worked a lot with SAP GUI Scripting and the pop ups are certainly the most dificult things to handle! I have worked a lot on it!! It was one of the greatest challenges in RPA
Please check My Excel File, the Sub “cmd_SAP_GUI_Clear_Unwanted”.