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!
December 31st, 2007 at 3:59 am
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….
April 16th, 2008 at 1:04 am
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!!!