51Testing软件测试论坛
标题:
QTP的reporter.ReporterEvent问题
[打印本页]
作者:
153994730
时间:
2008-7-14 12:48
标题:
QTP的reporter.ReporterEvent问题
我录了1段脚本, 想进行手动的检查并写报告, 但写报告时老报错:提示:类型不匹配:"reporter.Reporter.Event"
代码如下:
Dim LogName, Password, ExpResult, ActResult, PassOrNot, CaseCount
DataTable.ImportSheet "D:\TestResult.xls","LogChk","LoginChk"
LogName = DataTable.RawValue("LoginName","LoginChk")
Password = DataTable.RawValue("
assword","LoginChk")
ExpResult = DataTable.RawValue("ExpRslt","LoginChk")
PassOrNot = null
CaseCount = null
Dialog("Login").WinEdit("Agent Name:").Set LogName
Dialog("Login").WinEdit("
assword:").Type Password
Dialog("Login").WinButton("OK").Click
ActResult = Dialog("Login").Dialog("Flight Reservations").Static("Incorrect password. Please").GetROProperty("text")
Dialog("Login").Dialog("Flight Reservations").WinButton("确定").Click
if ExpResult = ActResult Then
Reporter.ReportEvent micPass, "Custom Step", "this case pass!", SteveRedd
else
Reporter.ReportEvent micFail, "LoginChk", "Check Failed", SteveRedd
End If
在线等ING... 希望有人帮忙解决哈...
作者:
zhou840401
时间:
2008-7-14 13:02
Reporter.ReportEvent micFail, "LoginChk", "Check Failed", SteveRedd ,第四个参数Not in use,把它去掉,就可以了。
作者:
dycadrtf
时间:
2008-7-14 14:03
楼上正解
作者:
153994730
时间:
2008-7-15 13:24
非常感谢哈
作者:
hyholine
时间:
2009-9-28 10:29
标题:
再次学习
学习了,很好
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2