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 som开发者_如何转开发e 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.
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).
精彩评论