|
5#
楼主 |
发表于 2012-3-12 20:18:20
|
只看该作者
已经试验过的,航班登陆小程序登陆循环、参数化代码:- Dim i
- Dim outputvalue
- Dim istatus
- For i=1 to datatable.GetSheet("Action1").GetRowCount
- Dialog("Login").WinEdit("Agent Name:").Set DataTable("agent_name", dtLocalSheet)
- Dialog("Login").WinEdit("Password:").SetSecure DataTable("pwd", dtLocalSheet)
- Dialog("Login").WinButton("OK").Click
- If Dialog("Login").Dialog("Flight Reservations").Exist Then
- Dialog("Login").Dialog("Flight Reservations").Static("Incorrect password. Please try again").Output CheckPoint("Incorrect password. Please try again_3")
- Dialog("Login").Dialog("Flight Reservations").WinButton("确定").Click
- End If
- outputvalue=datatable("output",dtlocalsheet)
- istatus=datatable("status",dtlocalsheet)
- If outputvalue<>istatus Then
- reporter.ReportEvent 1,"登陆:","预期值:"+istatus+",实际输出值:"+outputvalue
- End If
- datatable.GetSheet("Action1").SetNextRow
- Next
- Window("Flight Reservation").Close
复制代码 |
|