UFT自动化-参数化-导到excel提升

'检查openOrder的from,to,name和excel里面的from,to,name是否相同

from1 = Window("FlightReservation").WinComboBox("FlyFrom:").GetROProperty("text")

to1 = Window("FlightReservation").WinComboBox("FlyTo:").GetROProperty("text")

name1 = Window("FlightReservation").WinEdit("Name:").GetROProperty("text")

from2 =DataTable.GetSheet("Global").GetParameter("p_From").Value

to2 =DataTable.GetSheet("Global").GetParameter("p_To").Value

name2 =DataTable.GetSheet("Global").GetParameter("p_Name").Value

If from1=from2 Then

         Reporter.ReportEventmicPass ,"FromCheck","===="

else

   Reporter.ReportEvent micFail ,"FromCheck","!<>"

End If

If to1=to2 Then

         Reporter.ReportEventmicPass ,"FromCheck","Pass"

else

   Reporter.ReportEvent micFail ,"FromCheck","Fail"

End If

If name1=name2 Then

         Reporter.ReportEventmicPass ,"FromCheck","Pass"

else

   Reporter.ReportEvent micFail ,"FromCheck","Fail"

End If

 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

'连接到excel

Dim rownum

rownum =DataTable.GetSheet("Global").GetRowCount

If rownum = 0 Then

         DataTable.Import"C:\zhh_uft\练习\参数化\数据\data.xls"

End If

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

'全选第二张票

Window("FlightReservation").Dialog("FlightsTable").WinList("From").Select 1

 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

'票数提交到报告
tickets = Window("Flight Reservation").WinEdit("Tickets:").GetROProperty("text")
tickets1 = cint(tickets)
Reporter.ReportEvent micDone,"TicketNum",ticket

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值