Jump to content

How to check if a specific popup shows up?


Recommended Posts

Hi Gens,

I am a newbie. After tutorial, I feel I like this test tools pretty much.

I am working on some pieces for my current project. But after startup the desktop application, if it has been opened, then the application would popup a "software is running" messagebox. I want to write the script to contain this situation.

What should I do ?

Thanks.

Link to comment
Share on other sites

  • Moderators

@Bravolee there are a couple of ways to handle it. You get look in the help file under Window Management and use a combination of WinWait and WinExists to catch the pop up and deal with it (both sections have very nice example scripts to show you how they work).

A better approach, however, would be to use ProcessExists in your script. If the process for your 3rd party desktop application is already present you can then add some logic on how to handle it (throw an error, simply not open another instance, write to log file, etc.). ProcessExists also has a good example script to show you how it works.

If, after looking at these and trying them out for yourself, you get stuck, feel free to post your code here and we will do our best to assist.

"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

@JLogan3o13 Thanks so so much. You definitely answered my question. Now I increasing love this testing framework. :-)

Only one more stuff, based on my use these days, looks like AutoIT does not support WPF very well, is it? Or maybe I haven't learned how to make it.

I tried to use the finder tool to get the exact control id or something like that, what I can only get is the Window info. I want to know if AutoIT could be used to do auto test on WPF applications.

Link to comment
Share on other sites

  • Moderators

You are correct that some windows will not show all of the control IDs with the native finder. It is at this point that you will want to invest some time reading in this topic:

The SimpleSpy tool has more functionality that the native AutoIt Window Info Tool

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