Sign in to follow this  
Followers 0
ndw

Error handling and error discovery

4 posts in this topic

Hello, this isn't a specific coding question and more a fact finding exercise!

I'm writing a script with a command line interface that opens up an application and performs regression testing on it. It takes pictures of the application and i use an image difference application to find the results. This is all working fine so long as the pictures are there.

The problem i'm finding is, if something goes wrong with the program, it can pop up an error message box which i have no idea how to constantly check for, or after clicking something nothing happens cause the application has frozen. I've had the application close down completely and the AutoIT script take my desktop to pieces too.

I wanted to know if anyone has any solutions, maybe using the software for a similar task to what i'm using it for etc?

Share this post


Link to post
Share on other sites



In the past I've resorted to running another script in parallel to constantly keep a lookout for certain specific dialog boxes and to deal with them. This can work if you know what error boxes you are likely to encounter.

Something like:

while 1 ;keep checking forever

Sleep(50) ;don't hog resources

If winexists (....

winactivate(...

Send("{enter}") ;send an enter kerystroke to the dialog to close it, or you could send a control click or keyboard shortcut

Endif

WEnd

(remember to close the program when you're done with it)

Share this post


Link to post
Share on other sites

There is a with the same subject. A script waits just for windows to pop up generated by a specific process ID and clicks them away.

is some code wo work with.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thank you to both of you for your suggestions. I'll get reading through them to try and get my head round them!

Share this post


Link to post
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
Sign in to follow this  
Followers 0