如何调用QTP API

发布于 2024-12-08 20:14:31 字数 510 浏览 4 评论 0原文

我想编写一个程序来进行一些GUI(JAVA Swing)自动测试。该程序需要调用QTP API。 QTP的界面可以捕获GUI结构并将其转换为xml文件。我查了帮助文档,找到了我需要的接口,但是我仍然不知道如何从Java编写的程序中调用QTP相应的API。我需要在QTP中导入一些文件还是应该下载一些包?

我想要调用的方法位于对象存储库中,直到它像这样:

Description
Retrieves all test objects under the specified parent test object.
Syntax
object.GetAllObjects ([Parent])

如何在 Java 程序中调用它?

顺便问一下,有语言要求吗?该文档说“您可以使用任何支持自动化的语言和开发环境来编写自动化程序。例如,您可以使用VBScript、JavaScript、Visual Basic、Visual C++或Visual Studio.NET。”,但我想知道是Java能够完成任务吗? 谢谢。

I want to write a program to do some GUI(JAVA Swing) automative testing.The program need to invoke the QTP API. The interface of QTP can capture the GUI structure and turns it into a xml file. I look up the helping document and I find the interface I need , but I still don't know how to invoke the corresponding API of QTP from the program written in Java. Do I need to import some files in QTP or should I download some packages?

The method I want to invoke is in the object repository until, it's like this:

Description
Retrieves all test objects under the specified parent test object.
Syntax
object.GetAllObjects ([Parent])

How can I invoke it in a Java program?

By the way, is there some language request? The document says that "You can write your automation programs in any language and development environment that supports automation. For example, you can use VBScript, JavaScript, Visual Basic, Visual C++, or Visual Studio.NET.",but I wonder is Java able to complete the task?
Thanks.

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

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

发布评论

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

评论(1

追风人 2024-12-15 20:14:31

QTP的API是基于COM的,列出的语言支持直接与COM通信。如果你想使用 Java,你应该使用某种 Java COM 桥(显然 JACOB 没有维护)。

QTP's API is COM based, the languages listed support communicating with COM directly. If you want to use Java you should use some kind of Java COM bridge (apparently JACOB isn't maintained).

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