Desi Posted January 27, 2010 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
water Posted January 27, 2010 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Desi Posted January 27, 2010 Author 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
Desi Posted January 28, 2010 Author 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?
water Posted January 28, 2010 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Desi Posted January 28, 2010 Author 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.
water Posted January 28, 2010 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Desi Posted January 28, 2010 Author 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".
water Posted January 28, 2010 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Desi Posted January 28, 2010 Author 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
water Posted January 28, 2010 Posted January 28, 2010 Glad to be of service. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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