In the middle of the run, the SAP Logon screen will appear, hindering UIPath from finding the next element.
Trying to minimize the screen using UIPath hotkey “Windows + down” does not work and the screen will keep appearing.
Double check that you have added a selector to your ‘find text’ activity, and that the selector has a window name other than the logon. Then it should’t matter if the sap logon screen is in front of the correct screen.
Secondly, check that with your activities, that you unselect the ‘activate screen’ in the properties panel.
If this prevails, it would be a good idea to chat to the SAP Administrator at your client.
So, if what @Thomas_Volker suggested doesn’t work you can always create a global error handler and run this VB script. This will start the scripting engine and check if the title of the active window is “SAP Logon 750”. If true, it will close the that window. This isn’t the best way, but it will probably work.
Sub Close_Logon_Window()
Dim SapGuiAuto As Object
Dim SAPApp As Object
Dim SAPCon As Object
Dim session As Object
SapGuiAuto = GetObject("SAPGUI")
SAPApp = SapGuiAuto.GetScriptingEngine
SAPCon = SAPApp.Children(0)
session = SAPCon.Children.ElementAt(0) ' <--- Assumes you are using the first session open. '
If session.ActiveWindow.Text = "SAP Logon 750" Then
session.ActiveWindow.Close
End If
End Sub