9

我需要自动化位于仅 IE 网站内的 Java Applet。我知道我可以使用Java Access Bridge与 Java 应用程序进行交互,但是我在找出如何将它连接到 Applet 时遇到了麻烦。

我知道一个 Java Bridge 方法GetAccessibleContextFromHWND(..),我认为我可以使用它。FindWindow(..)不幸的是,当我使用 Spy++ 尝试获取 Applet 的 HWND 时,我返回空白,因此使用通常的Windows API 函数似乎无法做到这一点。

如何使用 Java Access Bridge 访问和控制 Java Applet?

4

1 回答 1

0
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.
于 2018-06-05T13:22:42.010 回答