Jump to content

How to automate Java windows/controls?


Jon
 Share

Recommended Posts

This is two year old post when Jon ran into Java Console (which is made up using Java). Going by the replies I have assumed that there is no direct/indirect way to read/write to Java Application thru AutoIt. And I have not yet found all-in-one direct and independent simulating/automating tool for Java and Java Applet that is not paid.

Following the links I went to "Java Access Bridge for Windows". Installed it and tried out the bundled utilities (JavaFerret, JavaMonkey), and it was able to read the content of a Java Application as well as the Java Applet running inside IE6.

Has anyone tried it to read and simulate inputs using it? Can we add the support for it in AutoIt. The source code is available though I was not yet able to compile it yet as it needs JDK. I'll try it out in next couple of days.

Link to comment
Share on other sites

I have compiled and played with this API and associated tool. Using this it is possible to get information about the Java Window and its sub Controls as well as perform action on it. With some effort it will be possible to add this capability to AutoIt, though it will need the Java Access Bridge to be installed before it can be used.

I will fork this into separate thread and report as I work thru. I m 80%-90% sure that it will work with recent Sun Java versions. How much and what all Java UI it can work with will have to see.

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

Can you elaborate on finding the right route on the parent/child trees? Can you provide a code snippet and a JM (java monkey) screen-shot as an example? That would be extremely helpful. I am having difficulty on knowing just what is accessible/visible in the Java applet I am trying to automate. I am not sure how I can get to the descendents properties, if at all. Java ferret can see them and so can Java monkey, but I cannot access them using the java.udf calls to JAB.

Ken

Link to comment
Share on other sites

  • 5 months later...

I'm not sure if this has been posted or not but I saw this and thought it belongs here.

auto it in Java thread.

Edited by bo8ster

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

  • 7 years later...
On 3/15/2007 at 0:55 PM, Jon said:

So I had a look at a couple of Java programs. Notably the Java Control Panel that most people will have. And it's like a total black box. Using Window Spy++ I could see the main window but even though the window was full of buttons and checkboxes and stuff - there were no child windows!

 

I thought automating Java controls would be a case of finding out which messages it accepts to do what - but if it doesn't even present a child window to send to I'm a bit stumped. Spy++ couldn't even see any unknown/registered messages when you click on things.

 

Is there a Java SDK type thing for programming these sorts of apps - that might shown how they are control internally and help out. I mean, there must be an internal command for selecting a checkbox.

 

Ideas welcome.

Same for the .NET GUIs, pop ups which are developed using C#

Link to comment
Share on other sites

  • Moderators

@breakbadsp last time. You have a thread for this, stop resurrecting old threads and show some patience please.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...