Can I automate such application (JAVA)

Nov 22, 2013 at 11:15 AM
Edited Nov 22, 2013 at 11:18 AM
Hello,

I'm new to UIA but not new to PS. I have one application that I would like to automate:

Image

As you can see, there are no more child-controls (Calc has all buttons listed here) Is there any way to automate such app or there is no hope as app don't have anything that UIA ca "see" and "Click"
Coordinator
Nov 22, 2013 at 11:47 AM
Hi ALIENQuake,
there is a special library for Java SWT applications: Java Access Bridge (i.e., UI Automation provider by Oracle, previously, by Sun). It helps automate SWT applications, however it supports not every app.

We cannot redistribute the library (it seems to me that it could be distributed occasionally as a result of gathering all binaries during the compilation process), you'd better download it from the link.
Our framework is shipped with script that helps you perform settings that are mentioned on that page (i.e., copy binaries to right places, etc).

Once you set up the script (paths are inside) and put binaries to a place you set in the script, run it as administrator. Alternatively, perform all steps manually as said on the page. Probably, restart will be needed.
After that you should access controls via our module or via UIAVerify is this application is supported by Java Access Bridge.

To test the installation of Java Access Bridge, try to find controls in an application that is inside the Java Access Bridge package via UIAVerify or UIAutomationSpy (I forgot there should be Oracle's libraries in the folder from you are running our module or not).
The corresponding blog page demonstrates the steps.
Nov 22, 2013 at 1:41 PM
I was able to test that this solution actually works, unfortunately my application doesn't support this. Thank you anyway.
Coordinator
Nov 22, 2013 at 2:00 PM
Yes, it's called an AWT application as the picture says. AWT is a predecessor of SWT (Swing) and a very old framework from the nineties, and, probably, does not support Accessibility.
It should support Java robot library (a library that sends low-level instructions like mouse click and keyboard characters, ups and downs) and, as far as I know, Java code could be run from .NET via a couple of free frameworks (IKVM and jni4net). However, I'd recommend to find a free tool for Java automation instead of working with Java robot from C#/PS (it seems ugly to me).