| || |
How to handle System/Application Errors using TP
I using TP5.4 and I need to do some bit of Error handling for the handling the Application Errors/System Errors and log the the Error to TestPartner.
At present I'm just checking for Particular Object on the Screen, wait for some seconds and if it is not located then we are skipping to next object or HTML component. The code is as follows....
waittime = 1
Do While Not HTMLEditBox("Name=" & Trim$(objWs.Cells.Item(1, iC))).Exists
waittime = waittime + 1
If (waittime > 10) Then TestLog.Comment "Wait Time exceeds 10 seconds for finding " + objWs.Cells.Item(1, iC) + " going to Error Mode """
HTMLEditBox("Name=" & Trim$(objWs.Cells.Item(1, iC))).SetText <Value>
Now I want to capture the Application Errors, suppose some EditBox is not filled, so popup appears and we need to click that popup screen and capture that to the logging database.
What should I do to implement this kind of Error handling.. with every HTMLComponent shown above..
Please help me out..