Absent Member.. Absent Member..
Absent Member..
676 views

SAP GUI - Script runs OK in VuGen but NOT from Controller

Hello everybody,

 

I'm facing this issue and I don't know why is this happening.

 

I have this script that runs OK in VuGen, I'm validating an object of the GUI with the next code

 

lr_save_string("/app/con[0]/ses[0]/wnd[0]/titl","objStatus");
sapgui_get_property("{objStatus}","Text","objText",LAST);
result = strcmp(lr_eval_string("{objText}"), "Visualizar impresión para LOCAL página 00001 de 00001");

if (result == 0)
{

   lr_log_message("Visualizacion de Impresion correcta");
   lr_output_message("Visualizacion de Impresion correcta");
   lr_end_transaction("SCR005_TR006_Boton_Visualizar_Impr", LR_PASS);

}
else
{

   lr_log_message("ERROR, no se pudo cargar la Visualizacion de Impresion");
   lr_output_message("ERROR, no se pudo cargar la Visualizacion de Impresion"); 
   lr_end_transaction("SCR005_TR006_Boton_Visualizar_Impr", LR_FAIL);
   lr_error_message("ERROR, no se pudo cargar la Visualizacion de Impresion");
   lr_exit(LR_EXIT_ITERATION_AND_CONTINUE,LR_FAIL);

}

 When I run it from controller it shows the next errors:

 

Action.c(375): Error: Failed to get the "Text" property of SapGuiComponent "{objStatus}"       Snapshot Info [MSH 0 0 1]
Action.c(375): Error: Failed to get the status bar text
Action.c(375): Error: Failed to find SapGui component by ID "sbar"

 

I have tried everything, since changing the code for validate the existence of the object instead of the text value, to change the log level, etc,  and it still doesn't run OK.

 

I would apreciate any help.

 

Regards.

 

0 Likes
5 Replies
Absent Member.. Absent Member..
Absent Member..

I have found this article which explains that could be for the Patch Level of the SAP GUI Client:

 

 

http://softwaretesttips.com/2011/04/14/sapgui-protocol-script-replay-fails-when-using-the-sapgui-7-20-patch-3-with-loadrunner/

 

Have anyone tried this?

 

Best Regards.

Tags (2)
0 Likes
Absent Member.
Absent Member.

Greetings Javila

 

Hoping you are doing well!

 

I am Alexis Brenes a LoadRunner Support Representative, I am going to research and then I will try to provide you valuable information about the concern you have.

 

Thanks a lot!

 

Kind Regards,

 

AlexisB

0 Likes

Hi JAvila,

 

This solution also is mentioned in HP support site:

http://support.openview.hp.com/selfsolve/document/KM1189977

 

So I think you should try and please kindly share the result.

 

Thanks and Regards,

Chau Nguyen

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
Absent Member.
Absent Member.

Hi Javila,

 

Hoping you are doing well!

 

May you please let me know what is the version of SAP GUI and LoadRunner you have installed?

 

I need that information to then provide you valuable information that may solve this issue.

 

Kind Regards.

 

AlexisB

 

 

0 Likes
Absent Member.. Absent Member..
Absent Member..

Hello guys, thank you for your reply,

 

I have installed SAP GUI 7.3 and the problem was ocurring. I was taking a deeper look on it, and seems to be something related with the build-in client that uses the load generator to run the scritpts. If I turn the Run-Time setting to visualize the SAP GUI (built-in) while running a scenario, it doesn't show some objects, but if I set Run-Time Settings to use the real SAP GUI, it runs OK, but there's no way to hide the real SAP GUI during scenario execution, so there's no chance to excecute more than a few users from a LG.

 

Somebody told me that I need to add the SAP GUI installation path to Windows Environment Variables to solve it, but right now cannot try it because I'm no loger anymore in that project.

 

Let me see if there's a way to test the Win Env workaround and I let you know. If somebody else could try it too would be great.

 

Regards.

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.