Question: SAPGUI script fails on second iteration

Subject: Help wanted in SAP with LR..

Hey Stuart,

I Guess u have got good experience in LR with SAP…
I got into a problem in my work place.. hope u can figure it out.. pelase let me know if u have a solution for his..

I created a Script for R/3, ( Order to Cash ) which will have 10 materials in a single transaction..
When i run the script with 1 Iteration, it is successfull.

But when i run it with 2 Iterations,, its bouncing from the program..
This happens even in Controller…

So please let me know if there is a solution for this..

Vxxxxx.

You need to make sure that the Action part of your script starts and ends in the same place (and with the same state) in your application.

If the screen is different on the second iteration, your script will probably fail.

Note that sometimes the screen looks the same, but object references are different. You can check this by recording two iterations of your business process in a single script and comparing iteration 1 with iteration 2 (including the object IDs).

Hey Stuart,

What you said was absolutely right..

We resolved the issue by adding a set focus function in the loop..so that on each and every iteration, it comes back to the focus..

Thanks a lot!

Tags: , ,

6 Responses to “Question: SAPGUI script fails on second iteration”

  1. Hmmm, this seems like an odd solution to me. Since automating the SAPGUI works by invoking methods directly on the COM object of the SAPGUI the actual window focus is normally not needed. Maybe the set focus method did force a re-binding of the internal object references….

  2. victor says:

    Hi,

    Normally I record a last step before the logout that executes the transaction \n. This is the same that returns to the home page, and on the second iteration find the same situation that on the begin of the script.

    Nice blog Stuart!!!

  3. eugene says:

    We have simmilar problem when Click and Script User fails on second interation after login action. We checked all other causes and we came to conclusion that it something to do with starting another iteratins as when we tried to call the same action recursevly from itself it was working. Is there any function that will reset all the context between each iterations. What happens when VUgen starts a new iteration.

  4. eugene says:

    We clean cookies and casche at start and end of action. There is only one Action is the script. We tried playing with runtime settings for browser simulation and tried all combinations :) This is not a data issue or a test case logic issue.

  5. Saritha says:

    Help Me,

    I need information for Certification with materials

  6. Sudha says:

    I’m having a strange problem with LR. I recorded the script; did the correlation and paramertization.
    There is more than enough data in the dat files for the parameters.
    But when I run the script, LR only picks the first row and repeats the actions only for that row of data(Eg: I put 10 vusers , one iteration, )
    But the script basically took only the first account number and worked on that.
    Never went to the second row of data. I tried all the options for the parameters there.

Leave a Reply