TA的每日心情 | 擦汗 2014-10-31 10:02 |
---|
签到天数: 4 天 连续签到: 2 天 [LV.2]测试排长
|
请大家帮忙看看执行QTP时系统提示如下错误
Dim strText
Dim Cus_Count_String
Dim Cus_Count_Pos
Dim Cus_Count_Len
Dim Cus_Count_Num
Cus_Count_String="Total Customer Count"
Dim Total_Tickets_String
Dim Total_Tickets_Pos
Dim Total_Tickets_Len
Dim Total_Tickets_Num
Total_Tickets_String="Total Tickets Count"
Dim Total_Sales_String
Dim Total_Sales_Pos
Dim Total_Sale_Len
Dim Total_Sale_Num
Total_Sales_String="Total Sales"
window("Flight Reservation").Activate
window("Flight Reservation").WinMenu("Menu").Select"Analysis;Reports..."
If window("记事本").Exist Then
reporter.ReportEvent micPass,"报告","报告生成并被打开"
strText=window("记事本").WinEditor("Edit").GetROProperty("text")
Reporter.ReportEvent micPass,"报告文本","报告文本是:"&strText
Cus_Count_Pos=cint(instr(1,strText,Cus_Count_String))+len(Cus_Count_String)
Reporter.ReportEvent micPass,"顾客总数数值的位置","顾客总数数值的位置是:"&Cus_Count_Pos
Total_Tickets_Pos=cint(instr(1,strText,Total_Tickets_String))+len(Total_Tickets_String)
reporter.ReportEvent micPass,"订票总数数值的位置","订票总数数值的位置是:"&Total_Tickets_Pos
Total_Sales_Pos=cint(instr(1,strText,Total_Sales_String))+len(Total_Sales_String)
reporter.ReportEvent micPass,"订票总数数值的位置","订票总数数值的位置是:"&Total_Sales_Pos
Cus_Count_Len=cint(Total_Tickets_Pos-Cus_Count_Pos)-len(Total_Tickets_String)
Total_Tickets_Len=cint(Total_Sales_Pos-Total_Tickets_Pos)-len(Total_Sales_String)
Total_Sale_Len=Len(StrText)-cint(Total_Sales_Pos)
Cus_Count_Num=Cint(Trim(Mid(strText,Cint(Cus_Count_Pos),Cus_Count_Len)))
reporter.ReportEvent micPass,"顾客总数数值","顾客总数数值是:"&Cus_Count_Num
Total_Tickets_Num=Cint(trim(Mid(strText,Cint(Total_Tickets_Pos),Total_Tickets_Len)))
reporter.ReportEvent micPass,"订票总数数值","订票总数数值是:"&Total_Tickets_Num
Total_Sales_Num=Trim(Mid(strText,Cint(Total_Sales_Pos),Total_Sales_Len))
reporter.ReportEvent micPass,"订票总价钱数值","订票总价钱数值是:"&Total_Sales_Num
window("记事本").Close
else
reporter.ReportEvent micFail,"报告","报告未被打开"
End If
在第55行
无效的过程调用或参数: 'Mid'
Line (55): "Cus_Count_Num=Cint(Trim(Mid(strText,Cint(Cus_Count_Pos),Cus_Count_Len)))".
第57行
类型不匹配: 'cint'
Line (57): "Total_Tickets_Num=Cint(trim(Mid(strText,Cint(Total_Tickets_Pos),Total_Tickets_Len)))".
请大家帮忙看看这是什么原因导致的呢? |
|