QTP无法创建ActiveX对象 [英] QTP Cannot Create ActiveX Object

查看:113
本文介绍了QTP无法创建ActiveX对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在处理脚本时,我面临着这个问题。

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

我也尝试过这样做:

Set qtpApp = createObject("QuickTest.application")

Set qtpApp = createObject("Quick Test.Application")

但是我一直在获取 Active X Component无法创建对象。在第x行: Set qtpApp = createObject( QuickTest.Application)

But I Keep Getting "Active X Component cant create object. on Line x: "Set qtpApp = createObject("QuickTest.Application")"

感谢任何帮助。

推荐答案

正确的prog-id是您首先尝试过 QuickTest.Application

The correct prog-id is the one you tried first "QuickTest.Application".

可能的原因是QTP未正确安装
验证这是否是您的机器e case

The probable cause for this is that QTP isn't installed correctly on your machine. To verify if this is the case


  1. 尝试手动启动QTP

  2. 检查注册表中是否存在以下项 HKEY_CLASSES_ROOT\QuickTest.Application\CLSID

  3. 从注册表中获取classid并检查其键是否在<$ c $下c> HKEY_CLASSES_ROOT\CLSID (或如果它是64位计算机,则 HKEY_CLASSES_ROOT\Wow6432Node\CLSID

  4. 验证是否在此键下 LocalServer32 指向QTP的bin目录下的 QtpAutomationAgent.exe

  1. Try launching QTP manually
  2. Check that the following key exists in the registry HKEY_CLASSES_ROOT\QuickTest.Application\CLSID
  3. Take the classid from the registry and check that the key for it exists under HKEY_CLASSES_ROOT\CLSID (or if it's a 64 bit machine HKEY_CLASSES_ROOT\Wow6432Node\CLSID)
  4. Verify that under this key the LocalServer32 points to "QtpAutomationAgent.exe" under QTP's bin directory

这篇关于QTP无法创建ActiveX对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆