|
我是新手,刚用QTP,很多地方不清楚,希望大家能多帮助下,十分感谢啊.
我现在想设置IF语句,就是当输入的NAME是123456的时候执行输入密码,不然就关闭程序,但是不知道怎么设置IF,试过多次不行,希望大家能帮忙解决下,谢谢
Dialog("Login").WinEdit("Agent Name:").Set "123456"
Dialog("Login").WinEdit("Agent Name:").Type micTab
If Then
End If 就是在这里设置IF语句
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "080912"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Paris"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Frankfurt"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "10528 PAR 12:48 PM FRA 04:18 PM AF $148.47"
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "SLIM"
Window("Flight Reservation").WinRadioButton("Business").Set
Window("Flight Reservation").WinEdit("Tickets:").SetSelection 0,1
Window("Flight Reservation").WinEdit("Tickets:").Set "3"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").Close |
|