简体   繁体   English

如何远程控制GUI应用程序?

[英]How do I remote control a GUI application?

I can easily control a console based app with the input and output streams from Java's Runtime.exec() method. 我可以使用Java的Runtime.exec()方法的输入和输出流轻松控制基于控制台的应用程序。 How would I control a GUI based application in the same manner. 我将如何以相同的方式控制基于GUI的应用程序。 I have looked at the Robot class, but there is no way for me to control one application programmatically. 我已经看过机器人类,但是我无法以编程方式控制一个应用程序。 Is there another Java library, or even another language's library that would allow me to spawn a GUI application and then be able to control that application? 是否有另一个Java库,甚至是另一种语言的库,可以让我生成GUI应用程序,然后能够控制该应用程序?

如果您指的是Java GUI,那么还有WindowLicker ,它是围绕测试而设计的,但对于驱动来说也应该一样好。

There are many tools to do record and playback. 有许多工具可以进行记录和播放。 Squish(frologic), RFT(IBM) are good examples. Squish(摩擦学),RFT(IBM)就是很好的例子。 There are many open source tools as well. 也有许多开源工具。

Did you check Jemmy - https://jemmy.dev.java.net/ . 您是否检查过Jemmy- https: //jemmy.dev.java.net/。 This provides API's to control the GUI program. 这提供了用于控制GUI程序的API。 You may expose some services in your program to call Jemmy APIs. 您可以在程序中公开某些服务以调用Jemmy API。

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

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