qtp flight 订票

本文展示了一个使用自动化工具进行登录验证及航班预订系统的测试流程。包括填写登录信息、选择预订选项、插入或删除订单等步骤,并通过数据表格来提供动态的数据输入。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


Dialog("Login").WinEdit("Agent Name:").Set "235235"
Dialog("Login").WinEdit("Password:").SetSecure "537363987f223d61a16ed34951bf79ced1fea3f9"
Dialog("Login").WinButton("OK").Click
Dim i
For i=1 to datatable.GetSheet("Action1").GetRowCount
       Window("Flight Reservation").WinButton("Button").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type DataTable("date", dtLocalSheet)

Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("from", dtLocalSheet)
Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("to", dtLocalSheet)
Window("Flight Reservation").WinButton("FLIGHT").Click
itemCount=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItemsCount
selectitem=RandomNumber(0,itemCount)
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select selectitem
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "1243"

Window("Flight Reservation").WinRadioButton("First").Click
If Window("Flight Reservation").WinButton("Insert Order").GetROProperty("enabled")=true Then
Window("Flight Reservation").WinButton("Insert Order").Click
else
Window("Flight Reservation").WinButton("Delete Order").Click
End If
call Window("Flight Reservation").WinButton("Delete Order").CheckProperty("enabled", true)
datatable.GetSheet("Action1").setnextrow
Next

Window("Flight Reservation").Close














































评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值