|
本帖最后由 黑羽祭 于 2013-1-7 11:13 编辑
我用到是QTP11,自带的Flight录制登陆,
参数化用户名和密码后,也设置了 RUN ALL ROWS,但是参数化只会循环第一行,请各位指教下面是我的VB脚本
SystemUtil.Run PathFinder.Locate("D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"),"",PathFinder.Locate("D:\Program Files\HP\QuickTest Professional\samples\flight\app"),"open"
Dialog("Login").WinEdit("Agent Name:").Set DataTable("userName", dtLocalSheet)
Dialog("Login").WinEdit("assword:").Set DataTable("passWord", dtLocalSheet)
Dialog("Login").WinButton("OK").Click
If Window("Flight Reservation").Exist(5) then
reporter.ReportEvent micPass,"登录验证","验证成功"
Window("Flight Reservation").Close
else
Dialog("Login").Dialog("Flight Reservations").WinButton("确定").Click
Dialog("Login").WinButton("Cancel").Click
'错误的用户名,密码无法登陆
reporter.ReportEvent micPass,"登录验证","验证失败"
end if |
|