[英]QTP Cannot Create ActiveX Object
While working on script, I am facing this issue. 在编写脚本时,我遇到了这个问题。
I can't post the whole code but this is a sample that does the samething that I wrote myself; 我不能发布整个代码,但这是一个与我自己写的相同的样本;
Dim qtpApp
Set qtpApp = createObject("QuickTest.Application")
qtpApp.Launch
I have also tried this: 我也试过这个:
Set qtpApp = createObject("QuickTest.application")
And This: 和这个:
Set qtpApp = createObject("Quick Test.Application")
But I Keep Getting "Active X Component cant create object. on Line x: "Set qtpApp = createObject("QuickTest.Application")" 但我继续获取“Active X Component无法创建对象。在第x行:”设置qtpApp = createObject(“QuickTest.Application”)“
Any help appreciated. 任何帮助赞赏。 Thanks.
谢谢。
The correct prog-id is the one you tried first "QuickTest.Application"
. 正确的prog-id是您首先尝试的
"QuickTest.Application"
。
The probable cause for this is that QTP isn't installed correctly on your machine. 可能的原因是您的计算机上未正确安装QTP。 To verify if this is the case
验证是否是这种情况
HKEY_CLASSES_ROOT\\QuickTest.Application\\CLSID
HKEY_CLASSES_ROOT\\QuickTest.Application\\CLSID
存在以下项 HKEY_CLASSES_ROOT\\CLSID
(or if it's a 64 bit machine HKEY_CLASSES_ROOT\\Wow6432Node\\CLSID
) HKEY_CLASSES_ROOT\\CLSID
(或者如果它是64位机器HKEY_CLASSES_ROOT\\Wow6432Node\\CLSID
) LocalServer32
points to "QtpAutomationAgent.exe" under QTP's bin directory LocalServer32
指向QTP的bin目录下的“QtpAutomationAgent.exe”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.