I am testing an application which is developed using Developer 6i and Oracle as backend. Its web version is available via Oracle 9iAS Server. After typing the URL, it loads the site as Jave applet. Under this main java applet various windows can be opened. First is the Login window. The problem is that, I cannot login into application via script because it is treating the main java window as dialog box. I am not able to distinguish different screen opened in it and their controls.
"An highly advanced bug is indistinguishable from a feature."
There is a nasty little issue around java applets where they are not seen by the system (therefore silk) until they are interacted with. This creates a chicken before the egg delema. The fix is to change the system focus to something other than the applet (DeskTop) and then back to the applet. Then the controls are seen by the system. I have a function that does this for me. I call it SlapTheDarnThing.
Simply create a function that ensures that the applet is there. Then will set focus to the desktop or something that you know is there. Then set focus back to the applet.
I add an additional check at the end where I check to see if one of the objects on the applet can be seen by silk. You do this with the exists method.
My function works only for my applet. I suppose one could write a function that takes as arguments the applet object and control objects so that the function would work on any applet. But I have not found the need for that.