There are many points to coordinate when recording Citrix scripts.
If you run into a script that fails and then re-run the script and it works, check the error that you are getting when the script fails. If the error is timeout while waiting for eventCreate Window check the following:
- Is Citrix leaving the windows open after running a script?
Record the window closing as part of the original script. You can also consider logging off the Citrix user from the server forcefully and terminate the Citrix processes in the RPT runtime machine.
- How much time is allowed for the create window?
20 seconds might not be enough time. Make the timeout allowance larger.
- Are the Citrix playbacks ending abnormally?
When a user session remains in the disconnected state in the Citrix server and there are stale wfica32.exe, wfcrun32.exe and CitrixRuntime.exe
processes on the RPT runtime machine, each subsequent attempt latches on to the disconnected state which is already in the abnormal state, thereby failing. In order to recover from this, we recommend logging off the Citrix user from the server forcefully and terminate the Citrix processes in the RPT runtime machine and retry. This requires suspending the playback for a small period of time.
- Does the userid have all the privileges needed for the Citrix environment?
Check the userid permissions and run all the actions yourself before creating a script.
Check these references for additional help
ITCAM for Transactions: Robotic,RPT, best practices, pitfalls Part1
Response Time and Availability Monitoring of Citrix Servers