自动打开qtp工具并执行脚本

Set qtapp = CreateObject("QuickTest.Application")
qtapp.Launch 启动qtp
qtapp.Visible = True  可见状态
qtapp.Test.Actions("Action1").SetScript "msgbox 0" //在action1里写入msgbox 0 代码
qtapp.Test.Run //运行qtp

qtapp.Quit //退出qtp
Set qtapp = Nothing

 以上代码要用vbs来写,文件名也是vbs

你可能感兴趣的:(qtp)