| || |
QTP with JavaAddon- How to call External Methods
I am having issue calling a method that is packaged in our Java Application. In WinRunner I am able to call them fine but in QTP I am unable to. Can some one please help me with this one.
Below are the details.
We have couple of custom functions packaged in our Java application and we call them in the winrunner in the following way:
In the Initialization File:
extern int jdc_SelectNode(in string str2);
In the scripts we use the functions this way:
jdc_SelectNode(“AM Work List”);
This is working fine and we are using it for the past many years.
In the QTP I tried the following:
Setting.Java ("JDC_CLASSES") = "com.pbs.intradanet.main.TreeSnoop"
Extern.Declare micInteger, "TreeSnoop.jdc_SelectNode", "com.pbs.intradanet.main.TreeSnoop", "jdc_SelectNode",micString
extern.TreeSnoop.jdc_SelectNode ("Work List")
This is not working and Invalid prodecure error is displayed when it QTP is on Extern.Declare statement. So in QTP how should I call the methods that were packaged in the application like we do in the WinRunner above?
Re: QTP with JavaAddon- How to call External Methods
Any one wants to take stab at this please?