On the SAP statusbar, I want to check if the message is of type success, warning or error. I am particularly interested in distinguish between an warning message and error message. I am using Studio 2019.10.4 Community Edition.
I tried the following options:
Option1: Using the Get Text of a read statusbar symbol, to check the properties. It is possible to distinguish the success message with PID and TID. However, using the same strategy is not possible to distinguish between the warning and error message as they have the same properties for PID and TID, and all the other properties are equal.
Option2: Update the package UiPath.UIAutomation.Activities = 20.2.0-preview, so that the SAP activities appear under UI Automation, and then use the Read Statusbar activity. The idea is to retrieve the property MessageType S (sucess), W (warning) or E (error). However, it returns the following exception:
RemoteException wrapping UiPath.Core.ElementOperationException: Attribute not supported by the current UiNode. ---> RemoteException wrapping System.Runtime.InteropServices.COMException: Attribute not supported by the current UiNode.
at UiPath.UiNodeClass.Get(String bstrAttr)
at UiPath.Core.UiElement.Get(String attribute, Boolean refresh)
--- End of inner exception stack trace ---
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
Option3: Install with no success the package UiPath.SAP.BAPI.Activities (all versions available in a Community Edition: 2.2.1, 2.2.0, 2.1.0, 2.0.0, 1.2.0, 1.1.0 and 1.0.0). I always get this message:
Option4: Use Image Exists and lower the accuracy to 0.7. On my computer, it works fine. However, when I run the workflow in another computer it does not work properly. I know this is an extremely unreliable solution as it depends on the computer configuration as screen resolution, image contrast, etc.
Any help would be so much appreciated