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:

89test89的个人空间 引用 删除 89test89   /   2019-06-03 14:58:52
 

评分:0

我来说两句

日历

« 2024-04-24  
 123456
78910111213
14151617181920
21222324252627
282930    

我的存档

数据统计

  • 访问量: 1427
  • 日志数: 3
  • 建立时间: 2019-06-03
  • 更新时间: 2019-06-03

RSS订阅

Open Toolbar