This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java driver on top of a Windows application?

 
RD Tee
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im looking to run a windows application through a series of automated steps, but I don't have access to anything lower than the actual GUI of the Windows program.

Is there anything built into Java that allows it to sit on top of a Windows application and act as a driver based on some data that is in the Windows app?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

The answer is "no", unfortunately. The way to manipulate a Windows GUI app is by sending it window events, and Java, being a cross-platform language, doesn't have a mechanism for doing this platform-specific thing.

There are plenty of Windows automation and test tools that can do this for you; perhaps someone else can suggest some. Or, of course, you can write a Windows app which does it.

Now, I should say that it's possible to write glue code in C which lets Java code call native platform code, and it's certainly possible that someone has a product which could be used to do what you need. But unless you really, really, really need to use Java for some reason, it'd be much simpler to go another route.
 
RD Tee
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the welcome =)

Well, the only reason I asked abou Java is only because its the language that I am most familiar with... I've just started to pickup on some C#, but I'm still not that comfortable with it. Is there something that you would recommend? Maybe a scripting language or something high level?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm no Windows expert, but I imagine C# (which is awfully similar to Java, really) would work fine.
 
RD Tee
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hm so how would I go about recognizing the button's on the GUI? It doesn't seem like there is a way to do this if the application is being built on a level above the GUI. Usually you would need to go one level lower... right?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic