|
版本: Rational RobotV7.0(从verycd.com上下的)
所测程序:QTP的飞机订票系统
录制好后回放成功,但参数化后运行,跳出录制的程序。接着马上转到TestManager,日志信息为Warning
右击playback warning信息,显示:“Unhandled Exception detected during playback. Robot stopped playing back”。
在IBM的官网上查到如下信息,但据它所说的是sqadatapoolclose()的问题,并不如此。
Error: Unhandled exception detected during playback. Robot stopped playing back
Technote (troubleshooting)
Problem(Abstract)
This technote explains how to resolve an unhandled exception that might occur when running IBM® Rational® Robot script with a TestManager datapool.
Symptom
Robot script with a TestManager datapool runs for a second, then TestManager log brings up the following error:
Unhandled exception detected during playback. Robot stopped playing back
Cause
Datapool corruption is one common root cause of this exception. However, other playback scenarios might also produce the same error message.
Resolving the problem
To resolve this error, ensure SQADatapoolClose() is called whenever SQADatapoolOpen() is used in Robot scripts. Specifically each SQADatapoolOpen() call must be followed by SQADatapoolClose(). This would proven Datapool corruption and this unhandled exception. Please contact IBM® Rational Support if there are questions.
录制编写的程序脚本如下:
'$include "sqautil.sbh"
Sub Main
Dim Result As Integer
dim i as integer
dim dp as long
dim uname as string
dim num as string
'Initially Recorded: 2009-3-1 13:49:02
'Script Name: t3
for i=1 to 3
StartApplication """C:\Disk_I\ForWork\Mercury\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"""
dp=SQADatapoolOpen("1")
call SQADatapoolFetch(dp)
call SQADatapoolValue(dp,1,uname)
call SQADatapoolValue(dp,2,num)
call SQADatapoolClose(dp)
Window SetContext, "Caption=Login", ""
InputKeys uname
EditBox Click, "ObjectIndex=2", "Coords=9,9"
InputEncKeys "CAAAAM4AAAAICaEYwet4JA=="
PushButton Click, "Text=OK"
Window SetContext, "Caption=Flight Reservation", ""
InputKeys "101010"
ComboBox Click, "ObjectIndex=1", "Coords=99,9"
ComboListBox Click, "ObjectIndex=1", "Text=Los Angeles"
ComboBox Click, "ObjectIndex=2", "Coords=89,4"
ComboListBox Click, "ObjectIndex=2", "Text=Seattle"
PushButton Click, "Text=FLIGHT"
Window SetContext, "Caption=Flights Table", ""
PushButton Click, "Text=OK"
Window SetContext, "Caption=Flight Reservation", ""
InputKeys "syy"
RadioButton Click, "Text=First"
EditBox Left_Drag, "ObjectIndex=2", "Coords=13,12,-23,9"
InputKeys num
PushButton Click, "Text=Insert Order"
'call sqadatapoolclose(dp)
Window CloseWin, "", ""
next
End Sub
或许是破解的问题,盼请高手予以指点
附截图: |
|