简体   繁体   English

AccessibilityInsights 未检测到基于 Java Swing 的 windows 桌面应用程序

[英]Java Swing based windows desktop application is not detected by AccessibilityInsights

We have developed a Windows based Desktop application using Java Swing and build a exe of it using javapackager available in Java 8. We have developed a Windows based Desktop application using Java Swing and build a exe of it using javapackager available in Java 8.

Now we are trying to automate the testing of it using Karate-Robot but Robot could not detect the fields on the GUI of Application.现在我们正在尝试使用空手道机器人对其进行自动化测试,但机器人无法检测应用程序 GUI 上的字段。 To further dig we have installed AccessibilityInsights suggested by Karate Community to figure out how to access elements on the GUI but it seems that our application is not getting detcetd in it.为了进一步挖掘,我们安装了空手道社区建议的 AccessibilityInsights,以弄清楚如何访问 GUI 上的元素,但似乎我们的应用程序没有在其中被删除。 See attached screenshot.请参阅随附的屏幕截图。

在此处输入图像描述

Can someone help us on how to fix the application?有人可以帮助我们如何修复应用程序吗?

Will Java Accessibility Bridge help here? Java Accessibility Bridge 会在这里提供帮助吗? As per documentation https://docs.oracle.com/en/java/javase/11/access/java-accessibility-guide.pdf , Application needs to implement Java Accessibility APIs when it needs to be available to Windows Assistive technologies. As per documentation https://docs.oracle.com/en/java/javase/11/access/java-accessibility-guide.pdf , Application needs to implement Java Accessibility APIs when it needs to be available to Windows Assistive technologies.

Edit 1: As per https://docs.oracle.com/javase/tutorial/uiswing/misc/access.html , "Because support for the Accessibility API is built into the Swing components, your Swing program will probably work just fine with assistive technologies, even if you do nothing special." Edit 1: As per https://docs.oracle.com/javase/tutorial/uiswing/misc/access.html , "Because support for the Accessibility API is built into the Swing components, your Swing program will probably work just fine with辅助技术,即使你没有做任何特别的事情。”

Ashish--阿什——

There have been multiple iterations of Windows-based assistive technologies over the years.多年来,基于 Windows 的辅助技术已经多次迭代。 The current iteration has existed since 2005 and is called UI Automation .当前的迭代自 2005 年以来就存在,称为UI 自动化 This is the technology that is required for OS-provided tools like Magnifier and Narrator.这是操作系统提供的工具(如放大镜和讲述人)所需的技术。 It's also the technology that is required by Accessibility Insights for Windows.这也是 Accessibility Insights 对 Windows 所需的技术。 From your description, it might also be the technology that is required by Karate-Robot.根据您的描述,它也可能是空手道机器人所需的技术。

Java Accessibility Bridge uses an older iteration of assistive technology that is no longer recognized by OS-provided accessibility tools. Java 辅助功能桥使用旧版本的辅助技术,操作系统提供的辅助功能工具不再识别该技术。 It is recognized by some third-party accessibility tools (JAWS and NVDA, for example), but it is not recognized by OS-provided accessibility tools.一些第三方辅助工具(例如 JAWS 和 NVDA)可以识别它,但操作系统提供的辅助工具不能识别它。 To the best of my knowledge, Oracle has no plans to support UI Automation in the future.据我所知,Oracle 没有计划在未来支持 UI 自动化。 When their docs say that your apps will "work just fine", they're referring to users who rely on these third-party tools.当他们的文档说您的应用程序“运行良好”时,他们指的是依赖这些第三方工具的用户。

Accessibility Insights for Windows has made a conscious decision to support only UI Automation, since supporting 2 platforms would make things much more difficult. Windows 的 Accessibility Insights 有意识地决定支持 UI 自动化,因为支持 2 个平台会使事情变得更加困难。 We chose to go with UI Automation because it is the only technology that is:我们选择了带有 UI 自动化的 go,因为它是唯一的技术:

  • Actively supported by the operating system, with new features being regularly added and documented.操作系统积极支持,定期添加和记录新功能。
  • Supported by native Windows controls and most actively supported language frameworks.由本机 Windows 控件和最积极支持的语言框架支持。
  • The technology that we would expect new assistive technology tools to implement first.我们期望新的辅助技术工具首先实施的技术。

I'm sorry to be the bearer of bad news on this.我很抱歉成为这方面坏消息的承担者。

DaveTryon (Accessibility Insights team) DaveTryon(无障碍洞察团队)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM