Rational Robot script halts at Clipboard VP

Technote (troubleshooting)


Problem(Abstract)

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

Symptom


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..


Disclaimer

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.

EXAMPLE SCRIPT


Declare Sub InitClip
Declare Function ProcClip As Integer

Declare Sub CloseClip

Sub Main

    Dim Count As Integer

   

    InitClip

    For Count = 1 to 100

      SQAConsoleWrite Cstr(ProcClip)

      CloseClip

    Next Count

End Sub

Sub InitClip

    SQAConsoleClear

    Clipboard.Clear

   

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

    Clipboard.Clear

   

End Sub




Cause

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

Resolving the problem

Consider the following changes to your script.



BEFORE


InputKeys "^a^c"

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



AFTER


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

Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Robot
Playback

Software version:

7.0.2

Operating system(s):

Windows

Reference #:

1449022

Modified date:

2013-08-01

Translate my page

Machine Translation

Content navigation