QTP_技巧
来源:互联网 发布:杭州理论培训网络授课 编辑:程序博客网 时间:2024/06/07 23:26
我们需要完成下面一系列操作
Window("Text:=HyperSna").WinButton("Caption:=日期").Click
Window("Text:=HyperSna").WinButton("Caption:=时间").Click
Window("Text:=HyperSna").WinButton("Caption:=确定").Click
为了方便其见,我们可以将Window("Text:=HyperSna")赋值到一个变量,然后再使用
参见下面的代码
Set WinHyper = Window("Text:=HyperSna")
WinHyper.WinButton("Caption:=日期").Click
WinHyper.WinButton("Caption:=时间").Click
WinHyper.WinButton("Caption:=确定").Click
如果使用了VBScript里面的With语句,还可以简化为以下代码
With Window("Text:=HyperSna")
.WinButton("Caption:=日期").Click
.WinButton("Caption:=时间").Click
.WinButton("Caption:=确定").Click
End With
Window("Text:=HyperSna").WinButton("Caption:=日期").Click
Window("Text:=HyperSna").WinButton("Caption:=时间").Click
Window("Text:=HyperSna").WinButton("Caption:=确定").Click
为了方便其见,我们可以将Window("Text:=HyperSna")赋值到一个变量,然后再使用
参见下面的代码
Set WinHyper = Window("Text:=HyperSna")
WinHyper.WinButton("Caption:=日期").Click
WinHyper.WinButton("Caption:=时间").Click
WinHyper.WinButton("Caption:=确定").Click
如果使用了VBScript里面的With语句,还可以简化为以下代码
With Window("Text:=HyperSna")
.WinButton("Caption:=日期").Click
.WinButton("Caption:=时间").Click
.WinButton("Caption:=确定").Click
End With
- QTP_技巧
- QTP_+/&
- qtp_数据驱动
- QTP_描述性编程总结1
- QTP_用eclipse第二次启动QTP遇到的问题
- QTP_在win7旗舰版上面安装qtp10/11时提示windows installer 安装日志错误
- QTP_在win7旗舰版上安装qtp10/11提示windows installer安装日志错误
- QTP_计算器_实现任意2个5位数的加减乘除
- 【软件自动化测试-QTP实战技能 16】==QTP_调用外部EXCEL数据替换DataTable中的数据
- 【软件自动化测试-QTP实战技能 20】== QTP_ Delete files from Temp Folder:删除Folder
- 技巧
- 技巧
- 技巧
- 技巧
- 技巧
- 技巧
- 技巧
- 技巧
- Android终端多线程断点下载文件
- Android 中的WiFi学习笔记——经典
- 中断请求与中断请求级
- MFC文件传输【原创】
- Redis学习(2)—— 实例与注释说明
- QTP_技巧
- 当代大学生思想与信仰问题论
- 把chrome请出系统盘,还让它自动更新
- Photon 分布式服务器架设-处理子服务器注册请求(三)
- Android BCM4330 蓝牙BT驱动调试记录
- Windows下面php5找不到php_curl.dll的问题
- 广播传送数据机制
- 关于LUN、PV、VG和LV
- lua文件操作(1)----基本读写