Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

UFT doesn't recognize object in SAP at first, but recognize it after i click debug


I work on UFT 12.52 build 6851 with SAP 730
I already have some tests, and now i want to create a test that will launch SAP and login. When i get to the connection window, UFT cannot recognize the object.
What is really weird is that if i click on debug and then just after click the play button UFT will recognize the object.
Moreover, i noticed that if the SAP Logon window is already opened, UFT will find the connection at first try.

Thanks a lot for any insight you might have,

Error message :

My object repository is as follows, i can show you the other objects but the error message speak about the "session" object :

My code really isn't that particular, but if you need to see it :

If DataTable.GlobalSheet.GetCurrentRow = 1 Then
reporter.ReportEvent micDone,"Version", "Utilisation of action : '" & actionName & "' in the version : '" & version & "'"

SystemUtil.Run "C:\Program Files (x86)\SAP\FrontEnd\SAPgui\saplogon.exe","","C:\Program Files (x86)\SAP\FrontEnd\SAPgui",""   'Open SAP
Dialog("SAP Logon 730").WinListView("SysListView32").Activate DataTable("Server", dtGlobalSheet)  'Open the connection to the desired server
SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("Client").Set DataTable("Client", dtGlobalSheet)    'Line that gets the error
SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("User").Set DataTable("User", dtGlobalSheet)
SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("Password").Set DataTable("Password", dtGlobalSheet)
SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("Logon Language").Set DataTable("Language", dtGlobalSheet)
SAPGuiSession("Session").SAPGuiWindow("SAP").SendKey ENTER
End If


2 Replies

Hi MabileauC,

Hope you are doing well.

Could you please let me know which SAP technology and version are you using you may refer below document to know all SAP support versions:


As you mentioned this seems to be weird and i want to test it in my end if is possible.

Best regards,


Ruddy Alvarez H.
Customer Support Engineer

If you find thst aat this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the pond show your appreciation.
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class


Sorry for not answering earlier, i wasn't subscribed to the thread.

I am using SAP 7300.2.5.1084


Best regards,

Cédric Mabileau

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.