Desi Posted January 27, 2010 Share Posted January 27, 2010 Hi, My question is related to software testing. Suppose we have a sample application under stress test with AutoIt. Now let say an exception occurs in that application in terms of Message Box etc. My question is how can we detect this unexpected behavior. Thanks in advance Link to comment Share on other sites More sharing options...
water Posted January 27, 2010 Share Posted January 27, 2010 (edited) Use winlist to get a list of all windows. Check the list for allowed windows and react on the other windows appropriate. This could be run in a separate script or enabled via AdlibRegister in the stress testing script. The example for Winlist in the help file shows how to limit the number of windows to visible ones. My 2 cents. Edited January 27, 2010 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Desi Posted January 27, 2010 Author Share Posted January 27, 2010 Use winlist to get a list of all windows. Check the list for allowed windows and react on the other windows appropriate.This could be run in a separate script or enabled via AdlibRegister in the stress testing script.The example for Winlist in the help file shows how to limit the number of windows to visible ones.My 2 cents.Thank you very much. I would try to use with OnEvent.Best Regards Link to comment Share on other sites More sharing options...
Desi Posted January 28, 2010 Author Share Posted January 28, 2010 Use winlist to get a list of all windows. Check the list for allowed windows and react on the other windows appropriate.This could be run in a separate script or enabled via AdlibRegister in the stress testing script.The example for Winlist in the help file shows how to limit the number of windows to visible ones.My 2 cents.I have tried your solution but WinList is giving list of all windows instead of windows related to my application. So that does not work. Can you please suggest me anything else? Link to comment Share on other sites More sharing options...
water Posted January 28, 2010 Share Posted January 28, 2010 What is common to all Windows and Messages Boxes belonging to your application? The same title (as a whole or in parts)? The same text somewhere in the Window? If yes then WinList can filter on the window title or text. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Desi Posted January 28, 2010 Author Share Posted January 28, 2010 What is common to all Windows and Messages Boxes belonging to your application? The same title (as a whole or in parts)? The same text somewhere in the Window?If yes then WinList can filter on the window title or text.Unfortunately there is nothing common between window titles, all windows have different title text. Link to comment Share on other sites More sharing options...
water Posted January 28, 2010 Share Posted January 28, 2010 So how do you know which windows/message box does belong to your application? If you don't know, how should the script know? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Desi Posted January 28, 2010 Author Share Posted January 28, 2010 So how do you know which windows/message box does belong to your application?If you don't know, how should the script know?The only common thing between all windows is their class name. All classes starts with "TAPP". Link to comment Share on other sites More sharing options...
water Posted January 28, 2010 Share Posted January 28, 2010 Fine, then you can use: #include <array.au3> $aWL = WinList("[REGEXPCLASS:TAPP]") _ArrayDisplay($aWL)) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Desi Posted January 28, 2010 Author Share Posted January 28, 2010 Fine, then you can use: #include <array.au3> $aWL = WinList("[REGEXPCLASS:TAPP]") _ArrayDisplay($aWL)) Thanks buddy. Now It's working. Great help from you. Cheers Link to comment Share on other sites More sharing options...
water Posted January 28, 2010 Share Posted January 28, 2010 Glad to be of service. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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