How to handle an exception in a script without using Recovery Manager?

Showing Answers 1 - 3 of 3 Answers

Naga

  • Feb 8th, 2006
 

You can handle an exception by using IF-ELSE Condition. Use

If <the window> exits()

 record the script for handling it

Else.....

Hope this helps you.

  Was this answer useful?  Yes

GGkeerthi

  • Mar 22nd, 2006
 

With out recovery scenario manager,we can handle exxeption part in qtp through error object and on error resume next statement which is provided by vbscript.

On Error Resume Next : causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure.

Using "Err" object msgbox "Error no: " & " " & Err.Number & " " & Err.description & " " & Err.Source & Err.HelpContext

Vijesh Nambiar

  • Aug 24th, 2006
 

Hi

      Could you please write little brief about the "err" object.Ho to handle/get the errors(err no) if it occurs when running the script,without raising the error by code.

Thanks,

Vijesh

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions