没有合适的资源?快使用搜索试试~ 我知道了~
flights qtp脚本
4星 · 超过85%的资源 需积分: 10 5 下载量 96 浏览量
2011-02-24
18:14:03
上传
评论
收藏 4KB TXT 举报
温馨提示
试读
4页
flights的qtp测试脚本,里面记载了参数化的应用及检查点
资源推荐
资源详情
资源评论
Services.StartTransaction "登录"
Dialog("Login").WinEdit("Agent Name:").Set "mercury"
Dialog("Login").WinEdit("Password:").SetSecure "4ca002b878a56d595c9a60f2e99111f888fe2b8c"
Dialog("Login").WinButton("OK").Click
Services.EndTransaction "登录"
Services.StartTransaction "订票"
Window("Flight Reservation").Activate
Window("Flight Reservation").ActiveX("MaskEdBox").Type "111111"
a=Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount
If Window("Flight Reservation").WinButton("FLIGHT").GetROProperty("enabled") = false then
Reporter.ReportEvent micPass,"FLIGHT按钮有效性","日期和航班输入前FLIGHT按钮无效"
else
Reporter.ReportEvent micFail,"FLIGHT按钮有效性","日期和航班输入前FLIGHT按钮有效"
end if
Window("Flight Reservation").WinComboBox("Fly From:").Select RandomNumber(0,a-1)//随机选择出发地
a1=Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("selection")
print a1
b=Window("Flight Reservation").WinComboBox("Fly To:").GetItemsCount
Window("Flight Reservation").WinComboBox("Fly To:").Select RandomNumber(0,b-1)//随机选择目的地
If Window("Flight Reservation").WinButton("FLIGHT").GetROProperty("enabled")=TRUE then
Reporter.ReportEvent micPass,"FLIGHT按钮有效性","日期和航班输入前FLIGHT按钮有效"
else
Reporter.ReportEvent micFail,"FLIGHT按钮有效性","日期和航班输入前FLIGHT按钮无效"
end if
b1=Window("Flight Reservation").WinComboBox("Fly To:").GetROProperty("selection")
print b1
Dialog("Login").WinEdit("Agent Name:").Set "mercury"
Dialog("Login").WinEdit("Password:").SetSecure "4ca002b878a56d595c9a60f2e99111f888fe2b8c"
Dialog("Login").WinButton("OK").Click
Services.EndTransaction "登录"
Services.StartTransaction "订票"
Window("Flight Reservation").Activate
Window("Flight Reservation").ActiveX("MaskEdBox").Type "111111"
a=Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount
If Window("Flight Reservation").WinButton("FLIGHT").GetROProperty("enabled") = false then
Reporter.ReportEvent micPass,"FLIGHT按钮有效性","日期和航班输入前FLIGHT按钮无效"
else
Reporter.ReportEvent micFail,"FLIGHT按钮有效性","日期和航班输入前FLIGHT按钮有效"
end if
Window("Flight Reservation").WinComboBox("Fly From:").Select RandomNumber(0,a-1)//随机选择出发地
a1=Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("selection")
print a1
b=Window("Flight Reservation").WinComboBox("Fly To:").GetItemsCount
Window("Flight Reservation").WinComboBox("Fly To:").Select RandomNumber(0,b-1)//随机选择目的地
If Window("Flight Reservation").WinButton("FLIGHT").GetROProperty("enabled")=TRUE then
Reporter.ReportEvent micPass,"FLIGHT按钮有效性","日期和航班输入前FLIGHT按钮有效"
else
Reporter.ReportEvent micFail,"FLIGHT按钮有效性","日期和航班输入前FLIGHT按钮无效"
end if
b1=Window("Flight Reservation").WinComboBox("Fly To:").GetROProperty("selection")
print b1
资源评论
- Vanishtu2012-05-18下了,但是好像用不了,应该是我太菜了。代码可以做参考
xiaoxiao57
- 粉丝: 6
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功