Interacting with Java Applet Window

How AutoMate finds and dissects windows

AutoMate’s Window Dissection Technology allows the specification of a window based on title as well as objects, controls, and/or text that are inside the window. This technology is implemented in all of AutoMate’s window-related actions and many of the interactivity actions such as the Move Mouse to Object, Press, Select, and Get Text actions. For more details regarding AutoMate's Windows Dissection Technology parameters, refer to Window Dissection Parameters.

How AutoMate views a Java Applet Window

AutoMate uses Windows API (Application Program Interface) calls to find and dissect an object, control or text inside a window. If the objects inside a window are not Standard Windows Controls, Windows API will not be able to find the objects and, consequently, AutoMate will not be able to interact with them.

Unfortunately, Java Applets do not use Standard Windows Controls. AutoMate is able to find the Java Applet window, but recognizes nothing inside it. The Java controls are basically “invisible” to AutoMate. From Windows’ point of view, the Java Applet looks like a window containing one large bitmap. Because of this, most of AutoMate’s interactivity actions (i.e. Move Mouse to Object, Press, or Set Text actions) will not work within a Java Applet Window.  

Solutions:

A possible way for AutoMate to interact with controls within a Java Applet Window is to set the focus to the Java Window and use the Send Keystrokes action to tab through the fields to set and get data or press buttons.

To set data you can simply use Send Keystrokes action to tab to the correct field and enter text. To get data, text for example, you will need to use Send Keystrokes to highlight and copy it. Achieving this will require you to send tabs and arrows to navigate to what you need to copy.

If everything you need to copy is already highlighted when your curser focus reaches the text (the default behavior for most text boxes) you can simply use the Copy action from the Clipboard folder. However, if it isn’t highlighted, you will need to use the Hold Down Key action to hold down the shift key and Send Keystrokes action to send arrow keys to highlight the text.

To press a button you will need to tab to the correct button and send a {Spacebar} or {Enter} key to the control using Send Keystrokes.

Another possibility is to use the Move Mouse action. This action uses pixel coordinates instead of control locations and therefore, is recommended for use if an application cannot be automated using standard interactivity actions. The Move Mouse action does not use AutoMate’s Window Dissection Technology. Instead, it is dependant on window positioning and screen resolution.

 

See Also

Window Dissection Parameters