Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..
630 views

SAP LR script goes to old(???) SAP session, breaks testrun

Hi,

I am writing scripts for an SAP ERP test, with SAP Gui 740, and LR 12.55. The user are Dialog users, and when I use them manual, they work fine. When I try to use them in the script, with sapgui_open_connection_ex and then sapgui_logon functions, something very strange happens.

The script plays, it enters the user credentials, but then it breaks. There is no indication in the logging then this (and yes, it is already extended login):

Login.c(15): Selected active connection "con[0]"
Login.c(17): Selected active session "ses[0]"
Login.c(19): Selected active window "wnd[0]"
Notify: Unexpected exception was thrown from "Unknown" SapGui object
Login.c(27): Error: Logon failed. Verify that the username and password that you provided are valid

When I make a screen recording, I can see that the login is finished, and an SAP main screen is shown, but, it is not the expected start screen. It is the screen of one of the SAP transactions that I was scripting.

So somehow, after logging in, LR is going to a cached page. (if that is possibkle at all)  If this was a web application, I would have several functions to clean the cache etc before the testrun. But on SAP Gui??? I have a suport case open of course, but maybe somebody saw this before? And yes, I checked in SAP, there were no old connections open for the testuser when this happend.

Sugestions?

 

 

 

0 Likes
5 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: SAP LR script goes to old(???) SAP session, breaks testrun

Hi,

Please enable SAPGUI recorder then reproduce the issue and share with us if the same issue happens with SAP tool.

Regards,

Chau Nguyen | SW Technical Support Consultant.
LoadRunner and Performance Center


If you find that 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 post and show your appreciation.
0 Likes
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: SAP LR script goes to old(???) SAP session, breaks testrun

Hi Chau

What do you mean with the SAPGUI recorder? Are you referring to the SAP options in the recording options popup?

BR,

Kaj

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: SAP LR script goes to old(???) SAP session, breaks testrun

HI Kaj,

I mean this one:

recorder.png

Regards,

Chau Nguyen | SW Technical Support Consultant.
LoadRunner and Performance Center


If you find that 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 post and show your appreciation.
0 Likes
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: SAP LR script goes to old(???) SAP session, breaks testrun

Hi Chau,

 

I do not see what you want to achieve by this, how would this help me? This error only happens when I record or playback through LR. When I use the users in a manual scenario, everything works fine..

 

Kaj

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: SAP LR script goes to old(???) SAP session, breaks testrun

Hi Kaj,

LoadRunner is also based on SAPUI recorder. If SAPGUI recorded cannot record so LoadRunner is the same

Regards,

Chau Nguyen | SW Technical Support Consultant.
LoadRunner and Performance Center


If you find that 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 post and show your appreciation.
0 Likes
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.