qtp 实践遇到的问题总结
上一篇 /
下一篇 2019-06-03 14:36:50
1、64位.net 安装补丁QTP_00699_64-Bit Applications.EXE;
2、datatable
取 datatable.getsheet("sheet名称")
使用
rowcount=datatable.getsheet("sheet名称").getrowcount
for i=1 to rowcount
'操作步骤
datatable.setnextrow
next
使用
DataTable.getSheet("Global").getParameter("列名").ValueByRow(1)
存 DataTable.Value("列名","Global")=SwfWindow("**").SwfTable("**").RowCount-2
3、模拟键盘操作
Set dr = CreateObject("Mercury.DeviceReplay")
dr.PressKey(57)'空格键
4、SwfComboBox 每次取第一个选项
Dim itemVal
itemVal=SwfWindow("**")SwfComboBox("**").GetItem(0)
SwfWindow("**")..SwfComboBox("**").Select itemVal
5、时间
取当前时间往后3天,并使用
Public Function get_date()
Dim currentdate
currentdate=date
currentdate=currentdate+3
get_date=currentdate
End Function
Dim jzdate
jzdate= get_date()
SwfWindow("**").SwfCalendar("**").SetDate jzdate
6、SwfTreeView 取子类第一个项目
datatable.value("**","**")= SwfWindow("**").SwfWindow("**").SwfTreeView("**").GetItem(2)
SwfWindow("**").SwfWindow("**").SwfTreeView("**").Type DataTable("**", dtLocalSheet)
收藏
举报
TAG: