用VBS脚本启动QTP时,运行时报错,无法打开项目,到底是为什么呢?
imG_TestPath'项目所在测试根目录DimqtApp'QTP应用程序setws=CreateObject("WScript.Shell")G_TestPath=w...
im G_TestPath'项目所在测试根目录Dim qtApp'QTP应用程序set ws=CreateObject("WScript.Shell")G_TestPath = ws.CurrentDirectory'自动获取项目所在测试根目录'WScript.Echo(G_TestPath)Set qtApp=createobject("QuickTest.application")qtApp.LaunchqtApp.visible=True'可见为False,不可见为FalseqtApp.Open G_TestPath'Open当前项目Set qtTest = qtApp.TestqtTest.Settings.Launchers("Web").Active = False'不开启IE浏览器
展开
展开全部
Dim qtapp,qttest
Set qtapp=CreateObject("quicktest.application")
set keyway=CreateObject("wscript.shell")
qtapp.Launch
qtapp.Visible=true
qtapp.Open "D:\QTPFrameWork\用例解析脚本\用例驱动解析(版本8)",false
Set qttest=qtapp.Test
qttest.Run
'msgbox "自动化测试用例解析成功"
'qtapp.Quit
Set qtapp=nothing
Set qttest=nothing
拿去执行吧,目录自己改啊
Set qtapp=CreateObject("quicktest.application")
set keyway=CreateObject("wscript.shell")
qtapp.Launch
qtapp.Visible=true
qtapp.Open "D:\QTPFrameWork\用例解析脚本\用例驱动解析(版本8)",false
Set qttest=qtapp.Test
qttest.Run
'msgbox "自动化测试用例解析成功"
'qtapp.Quit
Set qtapp=nothing
Set qttest=nothing
拿去执行吧,目录自己改啊
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询