If a script fails even after successful compilation, then check whether .NET Framework 1.1 was installed on the host using which the script was developed. If so, then check whether the Service Pack 1 for .NET Framework 1.1 was also installed on the host. Without this service pack, the script will not work properly despite getting compiled successfully. Therefore, ensure that Service Pack 1 is also installed.

When a script involving ICA sessions fails due to an unexpected error in the session, then subsequent executions of the script will also fail. This is because, when a script on ICA sessions fails for the first time, the point of failure of the script is retained. During subsequent executions of the script therefore, the ICA session opens at exactly the point of failure, causing the script to fail yet again. 

To solve this issue, ensure that once a script abnormally terminates, it logs off from the ICA session. Logging off closes all the applications, so that, the next time the script executes, it opens the ICA session at the right place.

  1. If recording and playback both are attempted on the Terminal Client, a session should remain open for the proper execution of the script.
  2. To make sure that script execution is not disturbed, it is recommended that the system on which the script executes is left unlocked, and the screensavers disabled. Alternatively, you can configure the script to automatically log off the system when script execution completes, and log back in before the script begins executing. Screensavers can also be controlled in a similar manner. To ensure this, do the following:

    1. Open a new script window (see Figure 20) and then select Playback Options from the Playback menu on its menu bar.

      Figure 20 : Opening a new script window

    2. Select the Log Off and On tab in the Playback Options dialog box (see Figure 21). Next, select the Logon at Script Start check box and proceed to provide a valid User Name and Password using which this script can login to the system. Then, specify a name for the User ID and Password file that will store the authentication information. A file with the specified name and extension ‘.pwd’ will be created, by default, in the same directory as the script.

      Figure 21 : Setting the Log Off and On options

    3. Finally, click the Apply button and then the ok button in Figure 21 to apply the changes, and then save the newly created script. With that, a Login script has been created.
    4. Now, create another new script for disabling screen savers. In the script window that appears, provide the script depicted by Figure 22 below and save the changes. This script will now ensure that the screen savers on the system are disabled.

      Figure 22 : Script for disabling screen savers

    5. Next, open the main script (i.e., the script that actually emulates a request to a client) and once again, select Playback Options from the Playback menu on its menu bar. As before, select the Log Off and On tab in the Playback Options dialog box (see Figure 23). Then, choose the Logoff Only with no Logon option, click on the Apply button therein, and then the ok button. This will make sure that once the script execution ends, the system logs off.

      Figure 23 : Logging off the system

    6. Next, at the top of the main script, invoke the script which disables screen savers. Finally, save the main script.
    7. Then, while configuring CitraTest using the eG manager’s admin interface, provide the path to the main script and the login script against the script parameter, separated by a comma. Remember to mention the path of the main script first, followed by the login script, so that the scripts execute in the same order. Finally, save the configuration.

When the main script begins executing on the target server, it first disables the screen saver on the target server and then proceeds to perform its other functions. Upon completion of execution, the system logs off as programmed. Next, the login script will start running. Using the specified user name and password (see Figure 21), this script will log back into the system.