how to handle user custom exceptions : Automation API

how to handle user custom exceptions

Class library usage, coding and language questions.

how to handle user custom exceptions

Postby Apex30 » Mon Feb 15, 2010 12:06 pm

Hello,

Could you please help me with the following problem. I have an standalone windows application. I try to automate UI testing. The problem is that during the work in application the UI custom user exception can be raised in the floating window which is visible about 1-2 seconds and after that you can work in application as well. So, when I record the test script with this exception, the test is always pass! because I couldn't trace this exception.
Apex30
 
Posts: 1
Joined: Mon Feb 15, 2010 11:59 am

Re: how to handle user custom exceptions

Postby Ciege » Mon Feb 15, 2010 6:36 pm

Well, if your AUT exception isn't Modal then you have to check for the exception continuously. Not the answer you were hoping for is it?...
Well, the most elegant solution I could come up with is to write some code to spawn a second thread whose job is to just check for exceptions. This way you do not have to continuously stop and check for exceptions in your main test code. If the second thread does catch an exception it will trigger the main thread to shut down and screenshot the desktop then close the log.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...
User avatar
Ciege
 
Posts: 907
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA


Return to Automation API

Who is online

Users browsing this forum: No registered users and 1 guest