InvokeMethods and InvokeJava
I am writing a script by recording a custom class for an custom java tree
can any one help me in how to use InvokeMethods and InvokeJava?? [img]images/icons/frown.gif[/img]
If I had any sample scripts it would be Helpfull...
Re: InvokeMethods and InvokeJava
Welcome to the world of whitebox testing. To really understand those commands you must experiment, experiment, and experiment some more.
Silk's examples (in the online help text) are useful for a starting point. What you will really need however is an experienced and supportive Java programmer. That person can explain which Silk-exposed Java methods are useful, and which aren't. (S)he might also be a key source of small .JAR files to help you get Java and Silk communicating at an entirely new level.
InvokeMethods() is useful to call methods that already exist and that don't require receipt of object types that Silk can't handle. You'll likely find that most of the methods and properties exposed with "Show All Methods" checked in Record/Class don't do anything obvious or useful. You'll also find that many methods must be called in particular sequences to have a desired effect. (Ask your developer about both of these.)
InvokeJava() on the other hand is useful when working with object types that Silk doesn't directly understand. It uses method calls in .JAR files that you create. Those methods act as a translator - an interface - between Silk and the app' you're testing. Here again, working with your favorite developer is the best way to proceed.