使用 QTObjectModelLib.dll 时出现 UnauthorizedAccessException

发布于 2024-12-05 23:05:28 字数 328 浏览 5 评论 0原文

我遵循 SO回答如何从C#运行QTP脚本。但是,在应用程序对象创建期间,我收到 UnauthorizedAccessException。有什么线索可能出了什么问题吗?这是异常的屏幕截图和源代码。

在此处输入图像描述

I follow an example from SO answer how to run QTP script from C#. However during Application object creation I get UnauthorizedAccessException. Any clues what might be wrong? Here is a screenshot of the exception and the source code.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

岁月静好 2024-12-12 23:05:28

如果您使用的是 Windows 7 或 Vista,请尝试以管理员身份启动您的开发区域,您很可能会遇到访问冲突。

If you're on Windows 7 or Vista, have a go at starting your development area as Administrator, chances are you're getting an Access Violation.

浮生面具三千个 2024-12-12 23:05:28

引用您引用的原始帖子的OP:

这段代码确实有效。但是,对于 QTP 10.0 版本,我必须更改
使用 QTObjectModelLib;使用 QuickTest;。

如果您也使用 10.0 版本,可能会有所帮助。

Quoting the OP of the original post you refer to:

This code did work. However, for QTP version 10.0, I had to change
using QTObjectModelLib; to using QuickTest;.

Might help if you are also using version 10.0.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文