QTP打开程序的几种方法

上一篇 / 下一篇  2011-03-30 22:48:28 / 个人分类:QTP

QTP打开程序,有几种方法:
1、SystemUtil.Run ' SystemUtil对象的Run方法
SystemUtil.Run "D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
2、InvokeApplication ' 调用程序函数
InvokeApplication "D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
3、WSH ' 通过wsh对象的Run(bat)或者exec(exe)方法
Dim oWSH
Set WSH = CreateObject("WScript.shell")
oWSH.exec "D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
Set WSH = nothing

Dim oWSH
Set WSH = CreateObject("WScript.shell")
oWSH.run " E:\WORK\Projects\3.bat"
Set WSH = nothing

TAG:

 

评分:0

我来说两句

Open Toolbar