Jump to content

Testing Java Swing app


Recommended Posts

How do you test java swing apps in AutoIt?

I am facing now a problem. I have to test application that has only main window titled (415.jpg from attachement - i cover names, so let's call this title "covered"). Every dialog windows that appear has only info like in 414.jpg from attachement.

I have a code like below:

WinWaitNotActive("covered")
If WinActive("[CLASS:SunAwtDialog]") == 0 Then
Exit
Else
MouseClick("left",640,808,1)
EndIf

Now, when dialog window appears, there is a mouse click and that's fine, but if there is no window, code waits. When i minimalize it, then code exits.

I'm not 100% sure, when i have my "covered" window active, that every other dialogs (maybe not visible) are not active, but if they will be active, i think it will try to MouseClick on it, but nothing happen.

Is there any method to return every class named objects of running app? Maybe, there is something which blocks it. Do you have any other solution?

Thanks in advance,

Michal

post-78836-0-86703800-1363962636_thumb.j

post-78836-0-26219400-1363962637_thumb.j

Link to comment
Share on other sites

  • Moderators

SirMisiek, AutoIt works with the Windows API. It has a terrible time with applications not written with this API. You can take a look at the JAVA UDF in the Examples section, but understand this is going to be difficult at best.

"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...