We are trying to evaluate the XDE Tester for one of our projects. I am using the "Java Web Server 2.0 - Administration" web page as the sample application under test.
The admin interface has a "tree" like object and some buttons at the top of the page. XDE Tester does not recognize these objects. But its able
to recognaize other objects - text boxes & command buttons - in the same page.
In WR there is a concept known as "Virtual Objects", using which we could map the unrecognized objects to other base GUI Object classes. This will allow us to use the functions
that are applicable to the base GUI Objects on the unrecognized objects in the application. Is there something similar to this (Virtual Objects) is available in XDE Tester??
Maybe something isn't configured correctly. Have you run the Java enabler on your browser JVM? Maybe the tree-view is an applet and the objects it can currently recognize are just html objects. Personally, I've only used this to test web-pages, so that's about as far as I can point you. I would think that XDE Tester should work on anything from Sun.
I went through the source class files of the Java Web Server Administration web pages(using JAD) and found that these objects are custom controls derived from the Panel object.
I think because of the base class, these controls are not recognized as separate object in the applet but part of the panel itself on which they are placed.
The XDE Tester is working fine with the sample application (Classic CD) provided with the XDE Tester and well as with other HTML / Applet applications. This problem is faced only with Java Web Server 2.0 Administration pages.
One more thing you can try is using getmappablechildren() to get all the objects in the page. This will return an array of TestObjects, from which you can get the required object(by comparing the properties) and can do actions on it.
Because, I have come across situations where some objects are not recognized during recording, but returned when using this function.
Approach to solve such problems
(This was using some symantec.itools.awt.MultiList object class custom objects)
1. Get necessary objects the GUI has by using XDE's getChildren method recursively.
2. get properties of each of these with XDE's getProperties method.
Capture all the property key-value pair. The best way to look at the result is to write the object and properties to a file.
3. Go through the above output file. Identify the object that you want. This requires some process of elimination.
4. After this is done, then get the methods and signature to invoke it, for that particular object.
Use XDE's getMethods that will return these information. ( Write to a file -- an easy way to look at it alter)
5. Invoke this method with the necessary arguments that is described by its signature.
You many need to create the required argument object correctly. Get the return value. This will be the result object.
You can refer to JNI on-line sun java.