回复 3# shingo0109
恩,这个方法昨天我尝试过,结果不行
今天又重新对脚本做了调整,可以了
- systemutil.CloseProcessByName("flight4a.exe")
- systemutil.Run("D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe")
- Dim A_result,E_result,i
- For i=1 to datatable.GetSheet("Global").GetRowCount
- Dialog("Login").WinEdit("Agent Name:").set datatable("login_name",dtGlobalsheet)
- Dialog("Login").WinEdit("Password:").set datatable("login_password",dtGlobalsheet)
- Dialog("Login").WinEdit("Password:").Type micReturn
- Dialog("Login").Dialog("Flight Reservations").Static("Please enter agent name").Output CheckPoint("msg")
- A_result=datatable("e_result",dtGlobalsheet)
- E_result=datatable("a_result",dtGlobalsheet)
- If E_result<>A_result Then
- reporter.ReportEvent micFail," 错误提示验证","预期结果为:"+E_result+",实际结果为:"+A_result
- End If
- Dialog("Login").Dialog("Flight Reservations").WinButton("确定").Click
- If Dialog("Login").Dialog("Flight Reservations").Exist(2)Then
- a_information=Dialog("Login").Dialog("Flight Reservations").Static("Please enter agent name").GetROProperty("text")
- e_information=datatable("messige",dtGlobalsheet)
- End If
- If e_information<>a_information Then
- reporter.ReportEvent micFail,"第5次密码错误验证","预期结果:"+e_information+",实际结果:"+a_information
- Dialog("Login").Dialog("Flight Reservations").WinButton("确定").Click
- systemutil.Run("D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe")
- End If
- datatable.GetSheet("Global").SetNextRow
- Next
复制代码 |