QTP无法创建ActiveX对象

编程入门 行业动态 更新时间:2024-10-23 20:27:42
本文介绍了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

  • 尝试手动启动QTP
  • 检查注册表中是否存在以下项 HKEY_CLASSES_ROOT\QuickTest.Application\CLSID
  • 从注册表中获取classid并检查其键是否在 HKEY_CLASSES_ROOT\CLSID (或如果它是64位计算机,则 HKEY_CLASSES_ROOT\Wow6432Node\CLSID )
  • 验证是否在此键下 LocalServer32 指向QTP的bin目录下的 QtpAutomationAgent.exe
  • Try launching QTP manually
  • Check that the following key exists in the registry HKEY_CLASSES_ROOT\QuickTest.Application\CLSID
  • 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)
  • Verify that under this key the LocalServer32 points to "QtpAutomationAgent.exe" under QTP's bin directory
  • 更多推荐

    QTP无法创建ActiveX对象

    本文发布于:2023-11-08 11:27:06,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1569242.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:对象   QTP   ActiveX

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!