Jump to content

How do I automate clicking on a Java app button?


Recommended Posts

I'm new to AutoIt and am attempting to automate a desktop Java application on Windows XP. I've set up Java Ferret to enable viewing the objects in the Java app window.

I need to have the AutoIt script click on a search button, but have been unable to figure out how to do it. I have set up the AutoIt Java UDF and have tried using some of these functions to click the button, but to no avail.

The following is the Java Ferret output when the mouse is hovering over the button to be clicked . What is the syntax of the AutoIt (or Java UDF) command that should be used to click the search button?

Version Information:

Java virtual machine version: 1.6.0_31

Access Bridge Java class version: 1.6.0_31

Access Bridge Java DLL version: AccessBridge 2.0.2

Access Bridge Windows DLL version: AccessBridge 2.0.2

AccessibleContext information at mouse point [0, 0]:

Name: Search

Description: Search Patients

Role: push button

Role in en_US locale: push button

States: enabled,focusable,visible,showing

States in en_US locale: enabled,focusable,visible,showing

Index in parent: 6

Children count: 0

Bounding rectangle: [500, 91, 576, 139]

Top-level window name: Desktop - Clinic - John Smith

Top-level window role: frame

Parent name:

Parent role: panel

Visible descendents count: 0

AccessibleActions info:

Number of actions: 1

Action 0 name: click

Accessible Value information:

Current Value: 0

Maximum Value: 1

Minimum Value: 0

Link to comment
Share on other sites

Perhaps, did you try using AutoIt Window Info Tool on the Java Window?

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Link to comment
Share on other sites

I did try using the AutoIt Window Info Tool, however since the app is Java-based, it does not display anything about the objects in the app window. Java Ferret is the comparable tool for Java apps and does display info for the objects, but I'm not sure how to use this info in an AutoIt command to click a button.

Link to comment
Share on other sites

Hi.

Did you workout any solution for your question? I also have again and again the need to automate Java stuff, with the same issues...

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

  • 9 months later...
  • Moderators

If you use the search feature looking for Java in the "Examples" forum, you may find a solution.

Doing that for me turned this up:

No "promises" other than looking "promising".

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Perhaps you should list what all you've tried to accomplish that has failed.

Seeing that I wasted my time looking for an alternate solution that you've already attempted to do is rather irritating.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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

×
×
  • Create New...