QTP Error Handling
Requirement is to call desired user define function while any error occurs during test execution. I donít want to use QTP recovery scenario manager (*.qrs) file to resolve the same.
Can any one share some other technique or VB script code for this type of error handling?
Re: QTP Error Handling
Generally you could use
On Error Resume Next
'You can call this block after above statements also, if you expect error.
If Err.Number <> 0 Then
'Report the error
'Call your user defined function here
This approach can work most of the times unless there is any different scenario.
RSS Feed : Break To Make it Better
A Lazy person could be the best automation professional, if he is not lazy in implementing his ideas to reduce his work. ~Anand Tambey