|
Set fly = window("regexpwndclass:=Afx:","regexpwndtitle:=Flight Reservation")
fly.WinEdit("nativeclass:=Edit","attached text:=Name:").set "huanglib" '设置登机人姓名
fly.WinEdit("nativeclass:=Edit","attached text:=Tickets:").set 2 '购买票张数
fly.WinRadioButton("regexpwndtitle:=Business").Click '选择商务舱
PriceTemp = fly.WinEdit("nativeclass:=Edit","attached text:=Price:").GetROProperty("text") '获取机票单价¥123形式
TotalTemp = fly.WinEdit("nativeclass:=Edit","attached text:=Total:").GetROProperty("text") '获取机票总价
Price = mid(PriceTemp,2) '去掉¥元符号
Total = mid(TotalTemp,2)
msgbox Price
msgbox Total
Price1 = Price*2
msgbox Price1&","&Total
If Total -1 = Price1-1 Then
reporter.ReportEvent micPass,"Price check Succes" ,"Price Check ok"
else
reporter.ReportEvent micFail,"Price Check Fail","Price = "&Price&"Total"&Total
End If |
|