|
本帖最后由 lalaine520 于 2012-3-27 17:12 编辑
通过订票系统,成功后Insert Order按钮会置灰,判断订票成功,否则不成功
代码如下:- Dim Insert_Done_Exist
- Dialog("Login").WinEdit("Agent Name:").Set "mercury"
- Dialog("Login").WinEdit("Password:").SetSecure "4f717d499e1525f1fe87b11e1db904b91638b7e1"
- Dialog("Login").WinButton("OK").Click
- Window("Flight Reservation").WinObject("Date of Flight:").Type "121212"
- Window("Flight Reservation").WinComboBox("Fly From:").Select "Denver"
- Window("Flight Reservation").WinComboBox("Fly To:").Select "Los Angeles"
- Window("Flight Reservation").WinButton("FLIGHT").Click
- Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
- Window("Flight Reservation").WinEdit("Name:").Set "tom"
- Window("Flight Reservation").WinButton("Insert Order").Click
- Insert_Done_Exist=Window("Flight Reservation").WinObject("Insert Order").Exist
- If Insert_Done_Exist=true Then
- reporter.ReportEvent micPass,"order success","According to the fact,it has really successed"
- else
- reporter.ReportEvent micFail,"order fail","According to the fact,it has really failure"
- End If
- Window("Flight Reservation").WinButton("Insert Order").Check CheckPoint("Insert Order")
复制代码 但是运行之中报错:
The "Insert Order" WinObject object was not found in the Object Repository.
Check the Object Repository to confirm that the object exists or to find the correct name for the object.
Line (13): "Insert_Done_Exist=Window("Flight Reservation").WinObject("Insert Order").Exist".
现求助大家,指点迷津,谢谢~ |
|