Jump to content

Recommended Posts

I face the issue that i try to automate a Java gui.
Unfortunately i cant adress any button etc. directrly The window info only gives met he "Mainframe"

Now i use alt + to navigate but is very unreliable as sometime the app takes longer to load.

How can this be achived.

Link to post
Share on other sites

Done that, installed that. 

Mouse position is retrieved 2885-195
  JAVA window found <> Java Window Title= Handle=0x000000000011023E  res: 1
Result getAccessibleContextFromHWND is <> ubound: 4
  We have a VMid 262446 ac 154332256
Call version info: PASSED VMID found : 262446
  VMVersion: <1.7.0_45>
  bridgeJavaClassVersion: <1.7.0_45>
  bridgeJavaDLLVersion: <AccessBridge 2.0.2>
  bridgeWinDLLVersion: <AccessBridge 2.0.2>
 *** getAccessibleContextAT result is <0> 
 *** getAccessibleContextAT result is <0> 






0
0
0
0
0
0
0
0
End of getAcceccibleContextAt info

Thats all i get back from the AWT Frame. 

Other Window

Mouse position is retrieved 2923-714
  JAVA window found <> Java Window Title= Handle=0x00000000009D16BA  res: 1
Result getAccessibleContextFromHWND is <> ubound: 4
  We have a VMid 262446 ac 154231376
Call version info: PASSED VMID found : 262446
  VMVersion: <1.7.0_45>
  bridgeJavaClassVersion: <1.7.0_45>
  bridgeJavaDLLVersion: <AccessBridge 2.0.2>
  bridgeWinDLLVersion: <AccessBridge 2.0.2>
 *** getAccessibleContextAT result is <0> 
 *** getAccessibleContextAT result is <0> 






0
0
0
0
0
0
0
0
End of getAcceccibleContextAt info


So how do I adress now the different windows? 
Buttons I dont get any information. But just beeing able to see if a gui is active or not would help me somewhat. 

something like WinActive("Handle=0x000000000011023E")

seems not to work

Link to post
Share on other sites
Posted (edited)

Problem could be that my App that i want to inspect not uses same JRE as defined in Windows. 
I updated all the paths to the dedicated JRE. Still face those issues. 

 

+>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop.
  Java Home: C:\Program Files\Java\jre1.8.0_321
  We are using OS X64 at cpu X64; Autoit 64 bit version @AutoItX64=1
C:\Program Files\Java\jre1.8.0_321\bin\WindowsAccessBridge-64.dll  PASS: Windows accessbridge WindowsAccessBridge-64.dll opened returns: 1
0 Windows_run returns: 
Reading from regkey: HKLM64\SOFTWARE\JavaSoft\Java Runtime Environment
JAVAHOME=C:\Program Files\DClient 4.10.9\java_jdk_windows-x86-64\jre
The current working directory: 
C:\Users\d\Documents\Sync\AutomationWe are using X64 at cpu X64 Autoit 64 bit version @AutoItX64=1
Opening C:\Program Files\DClient 4.10.9\java_jdk_windows-x86-64\jre\bin\WindowsAccessBridge-64.dll
  PASS : Windows accessbridge C:\Program Files\Dopix Client 4.10.9\java_jdk_windows-x86-64\jre\bin\WindowsAccessBridge-64.dll opened returns: 2
 0 initializeAccessBridge is finishedWindows_run passed :


 

Edited by derocco777
Link to post
Share on other sites

Did you try JavaMonkey or NVDA screen reader?

https://docs.oracle.com/javase/accessbridge/2.0.2/javamonkey.htm

When dealing with Java Accessibility Bridge there is not something like a free lunch. It really means google around and test the basic examples first if you get something recognized in your computer systems. From a distance its impossible to assist. 

I am not in a Java world at the moment so only can give generic advice.

Link to post
Share on other sites
Posted (edited)

Sure thank you. I have that all installed as defined. 
In the Monkey it seems to work. There i get some information out of it. 

NVDA i have not tried so far. 


But still i have no idea why your autoit script seems to fail nor how to acces an item now. 

2022-05-24_13h07_08.png

 

Strange is as soon as i click on "Display Accassbilty Information" then the Monkey crashes and closes without ANY information in the console. 

Ferret: As soon I want to track someting it crashes as well...

Edited by derocco777
Link to post
Share on other sites

1. Try first with jdk 1.8.2 to reproduce what is in jabsimplespy thread

2. Maybe this can help

Define an environment variable "JAVA_ACCESSBRIDGE_LOGDIR" which when specified, and pointing to a writable file location, will enable logging of Java Access Bridge activity. Two log files will be created, namely "java_access_bridge.log" and "windows_access_bridge.log": one written by the JavaAccessBridge itself (loaded by Java), one written by AT which loads a Java provided DLL, windowsaccessbridge.dll If the variable is undefined or empty, or points to a non-writable location, no logging will be performed. This will be provided to customers on request. The logging is explicitly limited to be enabled for one application at a time, i.e. it cannot support concurrent applications, which is sufficient for its purpose as a debugging tool.

Link to post
Share on other sites
  • 5 months later...

@junkew - I really adore the work you've done for autoit. I'm trying to run jabsimplespy.au3 on javacpl.exe. Simple UAI Spy is crashing on pressing ctrl+w. 

  • My java version is as follows:

p:\>java -d32 -version

java version "1.8.0_231"

Java(TM) SE Runtime Environment (build 1.8.0_231-b11)

Java HotSpot(TM) Client VM (build 25.231-b11, mixed mode, sharing)

  • Enabled JAB switch using below steps:

Go to Start > Control Panel > Ease of Access > Ease of Access Center. Alternatively, press Windows logo key+u to access the Ease of Access Center.

Select Use the computer without a display.

In the section Other programs installed, select the check box Enable Java Access Bridge (you may have to scroll down).

  • Placed WindowsAccessBridge-32.dll in C:\Windows\SysWOW64
  • Placed WindowsAccessBridge-64.dll in C:\Windows\SYSTEM32
  • Placed JavaAccessBridge-32.dll and JAWTAccessBridge-32.dll in C:\Program Files (x86)\Java\jdk1.8.0_231\jre\bin and C:\Program Files (x86)\Java\jdk1.8.0_231\bin (as I wasn't sure about the destination location)
  • Placed accessibility.properties in C:\Program Files (x86)\Java\jdk1.8.0_231\lib and C:\Program Files (x86)\Java\jdk1.8.0_231\jre\lib
  • Placed access-bridge-32.jar in C:\Program Files (x86)\Java\jdk1.8.0_231\jre\lib\ext as there is no ext directory inside C:\Program Files (x86)\Java\jdk1.8.0_231\lib
  • Placed jaccess.jar in C:\Program Files (x86)\Java\jdk1.8.0_231\jre\lib\ext

Kindly help me with debugging it and please let me know if you need more information from my end.

TIA

 

 

Link to post
Share on other sites
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...