Bravolee Posted July 10, 2018 Share Posted July 10, 2018 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 More sharing options...
Earthshine Posted July 10, 2018 Share Posted July 10, 2018 don't open the app more than once if it's running. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 10, 2018 Moderators Share Posted July 10, 2018 @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 More sharing options...
Bravolee Posted July 13, 2018 Author Share Posted July 13, 2018 @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 More sharing options...
Moderators JLogan3o13 Posted July 13, 2018 Moderators Share Posted July 13, 2018 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 More sharing options...
halo Posted July 20, 2018 Share Posted July 20, 2018 You can use ProcessExists in your script gmail sign up email Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 20, 2018 Moderators Share Posted July 20, 2018 Which is precisely what was suggested to the OP above, @halo "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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now