|
目标:我想做得是把登陆时的用户名作为订机票时候的客户的名字.
下面是我的做法
1.录制一个login的过程
2.录制一个order定机票的过程
3.在login的action中选择insert->call to copy of action,选择order action
4.在login中选择step->action properties设置一个output参数,参数名为username
5.在order中选择step->action properties设置一个intput参数,参数名为username
login的code如下:
Dialog("Login").WinEdit("Agent Name:").Set "111111"
parameter("username")=dialog("Login").WinEdit("Agent Name:").GetROProperty("text")
msgbox (parameter("username"))
Dialog("Login").WinEdit("Password:").SetSecure "4607a5c5b912f3e39b5373d215f01558060c8535"
Dialog("Login").WinButton("OK").Click
order的code如下:
Window("Flight Reservation").WinObject("Date of Flight:").Type "070513"
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").WinList("From").Select "2612 DEN 08:57 AM LAX 09:55 AM NW $130.80"
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
msgbox (parameter("username"))
Window("Flight Reservation").WinEdit("Name:").Set parameter("username")
Window("Flight Reservation").WinRadioButton("First").Set
Window("Flight Reservation").WinButton("Insert Order").Click
我该如何设置或code才能使order中获得login的输出参数植呢? |
|