10.19

Window("Flight Reservation").ActiveX("MaskEdBox").Click 8,2
Window("Flight Reservation").ActiveX("MaskEdBox").Type  micBack
Window("Flight Reservation").ActiveX("MaskEdBox").Type "101815"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Paris"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "13566   FRA   08:00 AM   PAR   11:30 AM   SR     $169.70"


Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "LIUJIE"
Window("Flight Reservation").WinRadioButton("First").Set
Window("Flight Reservation").WinButton("Insert Order").Click
pricetext=Window("Flight Reservation").WinEdit("Price:").GetROProperty("text")
'取值price
price=mid(pricetext,1) 
'弹出票价对话框
msgbox "price:"&price
Dim price,num,total,real
'取值Tickets
num1 = Window("Flight Reservation").WinEdit("Tickets:").GetROProperty("text")
'弹出票的张数对话框
msgbox "Tickets:" &num1
price1=Window("Flight Reservation").WinEdit("Price:").GetROProperty("text")
'取值Total
total1=Window("Flight Reservation").WinEdit("Total:").GetROProperty("text")
price = cdbl(mid(price1,2))
num = cint(num1)
total =cdbl(mid(total1,2))
real = price*num
'比较Price*Ticket的价格是否等于Total
If abs(total-real) <0.001Then
 
Reporter.ReportEvent micPass, "success", "订票正确" 
msgbox "订票正确" 
else
Reporter.ReportEvent micFail, "fail", "订票错误"
msgbox "订票错误"
End If
Window("Flight Reservation").WinMenu("Menu").Select "File;New Order"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值