Correcting object states

It is not always required to use the object state information that is captured when an object is manipulated in a script. If the state of the object does not match the state information in the script, the code might not work properly. If the exact state of the object is not necessary for the test that is performed, it might be beneficial to remove this state information.


The script for typing keystrokes, such as typing logoff, and then pressing Enter, when creating a host connection script is as follows:


At playback time, Extension for Terminal-based Applications waits for the TFrame to be in the ready state before it sends the keystrokes. The script for typing keystrokes before the synchronization algorithm for the terminal determines whether the presentation space is loaded when recording the script is as follows:

TFrame(ANY, UNINITIALIZED).inputKeys(logoff{ENTER}); 
This shows that the TFrame object was not initialized and not in the ready state when you started typing the command. At playback time, those keystrokes are sent as soon as the script reaches that line, regardless of the state of the terminal.

To correct the state of the terminal, remove the state information from the object in the script:

        //Remove "(ANY,UNINITIALIZED)" is any