How effectively I can use java_activate_method?
likewhen and how?..a guidence expected..
thanking in anticipation...
tell u that I have got very less knowledge on java.
java_activate_method() is a very useful function for testing Java apps. It helps you in getting lots of details out of your AUT (more than you can think of).
But the disadvantage is: You need good Java knowledge AND good knowledge of your AUT, otherwise you can't use it effectively.
My heaviest example of using java_activate_method() for testing was an application (based on a Java lightweight framework which WR didn't support) in which Winrunner recognized just one big panel, but not the objects inside the panel.
By using java_activate_method() I managed to test this AUT with very minimal analog recording (obj_mouse_click on coordinates was the most "analog" statement I did use).
When to use: Only when "normal" TSL statements won't solve your problem. The available methods depend on the Java object (button, combobox, table, ...).
First of thanks Juergen, now got the opening to use java_activate_method, already start using it, very helpful.
Now facing a difficulty..In my AUT like urs Winrunner recognized a big panel only but not inside its texts, where as I need to select a some of text,(obj_mouse_click--appears on rec). Winrunner recognize the whole panel as static text(java-addins).-null value returns on using static_get_text.
Similary another panel has got list items and edit box, as in rows not problem using WR std funtion for these items.Have a look at the structure----
TEXT1 LIST1 EDITBOX1
TEXT2 LIST2 EDITBOX2
TEXTn LISTn EDITBOXn
As selection of list edit box depends upon the TEXTs.But facing problem to get the value of theTEXT. Not able to recognize. use few java methods still not able to get the text....
Any clues for above hurdles...
I can't give you a specific solution on your problems, as I would need much more insight into your app and the classes your app is using.
But generally I use the GUI Spy quite a lot to see the properties of an object - e.g. TOOLKIT_class shows the class of this object. So I can look into some sort of documentation to find out more about this class and its methods (or ask the developers).
And the second help is the Java-methods tab of the GUI spy and the function method_wizard() to find our more about the available methods of an object.