views:

230

answers:

2

I can easily control a console based app with the input and output streams from Java's Runtime.exec() method. How would I control a GUI based application in the same manner. 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?

+4  A: 

If you mean Java GUIs, then there's WindowLicker, which is designed around testing, but should be just as good for driving .

skaffman
skaffman, you're a walking encyclopedia! How's a poor SOB to gain points if you're always first with the better solution? +1.
Carl Smotricz
I am looking for a library to remote control for external applications. In other words I won't have access to the code. This library you need to have access to the source to use it.
Samuel
For a mere $3000 - $6000 you can use QA Partner from Segue Software ( http://www.segue.com/about-segue/company-background.asp ). I wasn't able to find any other suitable code-agnostic tools, sorry!
Carl Smotricz
A: 

There are many tools to do record and playback. Squish(frologic), RFT(IBM) are good examples. There are many open source tools as well.

Did you check Jemmy - https://jemmy.dev.java.net/. This provides API's to control the GUI program. You may expose some services in your program to call Jemmy APIs.

Jayan
Record and playback was not what I was looking for. I found out what I needed was not available on Java as it is operating system dependent. I used c# which gives much more control over the Process object. You can access the gui of the external process and control it quite easily.
Samuel