[ 本帖最后由 LittleDuck 于 2007-12-4 10:54 编辑 ]作者: topchao 时间: 2007-12-5 11:17
TO xiaoyaoke & LittleDuck请问具体在VBS里怎么定义启动QTP和相应的test阿,没用过这个请指教!作者: xiaoyaoke 时间: 2007-12-5 11:39
QTP自带的脚本可以实现,我自己乱写的给你贴出来,你参考下:
'This script used to launch the QTP and make it download Build from Ftp
Function LaunchQTP(sTestPath)
Dim QTPApp
Set QTPApp = CreateObject("QuickTest.Application")
QTPApp.Launch ' Start QuickTest
QTPApp.Visible = True ' Make the QuickTest application visible
QTPApp.Open sTestPath '//该目录为用例的QTP文件保存文件夹
QTPApp.Test.Run , True' Run the test with changed parameters.
End Function