IBM Support

Rational Robot script halts at Clipboard VP

Technote (troubleshooting)


Attempts to playback an IBM Rational Robot script with a Clipboard VP result in a playback halt.


Steps to reproduce

  1. Start script recording against a table or a Notepad document with three lines.

  2. Highlight the first row.

  3. Create a Clipboard VP.

  4. Hightlight the second row.

  5. Create a Clipboard VP for the second row.

  6. Do the same actions for the third row.

  7. Insert a breakpoint before the first VP.

  8. Playback the script in debugging mode.

  9. Observe that the script execution halts at second VP.

The script runs the ClipboardVP repeatedly or contains multiple ClipboardVPs. Playback in non-debug mode yields the following results.

  • The playback stops on every Clipboard VP in an even position in the sequence. In other words every 2,4,6 ... th VP. if you use Ctrl +c to fill the clipboard If you press Ctrl + c manually at the point that the playback halts, the playback continues.

  • If you verify the clipboard content, the content is as expected.

  • Robot no longer reacts on keyboard strokes or yields cluttered output..


All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


Declare Sub InitClip
Declare Function ProcClip As Integer

Declare Sub CloseClip

Sub Main

    Dim Count As Integer



    For Count = 1 to 100

      SQAConsoleWrite Cstr(ProcClip)


    Next Count

End Sub

Sub InitClip




End Sub

Function ProcClip

    Dim Result As Integer


    Window SetContext, "Caption=MyText.txt - Notepad", ""

    Window WMaximize, "", ""

    InputKeys "^a^c"

    Result = ClipboardVP (Compare, "", "VP=ClipboardVP")

    ProcClip = Result


End Function

Sub CloseClip



End Sub


InputKeys "^a" does press the Ctrl key, but does not release it.

Resolving the problem

Consider the following changes to your script.


InputKeys "^a^c"

Result = ClipboardVP (Compare, "", "VP=ClipboardVP")


InputKeys "^a{LeftCtrl KeyUp}"                    

InputKeys "^c{LeftCtrl KeyUp}"                    

Result = ClipboardVP (Compare, "", "VP=Clipboard")

Alternatively you can try the following script.

Sub Main

    Dim Result As Integer

    Window SetContext, "Caption=MyText.txt - Notepad", ""


    InputKeys "a"

    InputKeys "{LeftCtrl KeyDn}a"

    InputKeys "{LeftCtrl KeyUp}"

    InputKeys "aaa"

    InputKeys "{LeftCtrl KeyDn}a"

    InputKeys "{LeftCtrl KeyUp}"

    InputKeys "aaaa"

End Sub

Document information

More support for: Rational Robot

Software version: 7.0.2

Operating system(s): Windows

Reference #: 1449022

Modified date: 01 August 2013

Translate this page: