|
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4b.exe"
Dialog("Login").WinEdit("Agent Name:").Set DataTable("UserName", dtGlobalSheet)
Dialog("Login").WinEdit("Password:").Set DataTable("Passwd", dtGlobalSheet)
Dialog("Login").WinButton("OK").Click
If Dialog("Login").Dialog("Flight Reservations").Exist(2)Then
Dim Errorinfor
'对错误提示信息做一个检查点,并根据实际情况进行参数化
Dialog("Login").Dialog("Flight Reservations").Static("Agent name must be at").Check CheckPoint("Agent name must be at")
Errorinfor=Dialog("Login").Dialog("Flight Reservations").Static("Agent name must be at").GetROProperty("text") (求解释)
Dialog("Login").Dialog("Flight Reservations").WinButton("确定").Click
Reporter.ReportEvent micPass, "用户名验证通过,提示信息如下",Errorinfor
Dialog("Login").Close
else
'如果用户名和密码正确就进入订票页面
If Window("Flight Reservation").Exist (2) Then
Reporter.ReportEvent micPass, "登录验证通过","用户名密码正确"
Window("Flight Reservation").close
End If
End If
1,希望可以提供以下Reporter的用法
2,对Reporter.ReportEvent micPass进行说明... 谢谢各位大大了 |
|