QTP执行时无法读取外部excel文件,使用vb脚本

我想使用vb脚本在QTP上运行testing,我可以打开QTP并开始运行testing。 但是,testing无法访问从中获取数据所需的外部数据表。

这是代码:

Set oShell = CreateObject ("WScript.Shell") Dim qtpAppObj,qtpTest 'Create the QTP Application object Set qtpAppObj = CreateObject("QuickTest.Application") 'Open the test in read-only mode qtpAppObj.Open c:\test, True 'set run settings for the test Set qtpTest = qtpAppObj.Test