How do I automate a Java Applet using the Java Access Bridge?

1.5k Views Asked by At

I need to automate a Java Applet which sits inside an IE only website. I know I can use the Java Access Bridge to interact with Java applications but I'm having trouble finding out how to hook it up to an Applet.

I am aware of a Java Bridge method called GetAccessibleContextFromHWND(..) which I thought I may be able to use. Unfortunately when I use Spy++ to try and get the Applet's HWND, I comes back blank so it seems this can not be done using the usual FindWindow(..) Windows API function.

How can I access and control Java Applets using the Java Access Bridge?

1

There are 1 best solutions below

0
On
1.Find Applet tag from HTML page and get position(Height/Width) of it.

2.Move your cursor toward Applet center position with reference of IE window.

3.Use **getAccessibleContextAt** API and use Applet x,y position.

4.Get Accesiblecontext from above API.

5.Iterate to root level Accesiblecontext. Finally you will get first object of Applet window.