|
本帖最后由 lt_123 于 2016-8-28 15:22 编辑
使用vb启动uft脚本,uft启动成功后没有执行F:\GUITest8的脚本就自动退出了。F:\GUITest8的脚本是没有问题的,直接在uf中运行能正常执行。各位有没有遇到这种情况,代码如下:
Dim qtApp
Dim qtTest
Dim qtResultsOpt
Dim projectPath
projectPath = "F:\GUITest8"
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True
qtApp.Options.Run.ImageCaptureForTestResults = "OnError"
qtApp.Options.Run.RunMode = "Fast"
qtApp.Open projectPath, True
Set qtTest = qtApp.Test
qtTest.Run
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions")
qtResultsOpt.ResultsLocation = projectPath & "\QTPReport"
qtTest.Run qtResultsOpt,True
qtTest.Close
qtApp.quit
Set qtResultsOpt = Nothing
Set qtTest = Nothing
Set qtApp = Nothing |
|