Interview Questions

When to use a Recovery Scenario and when to us on error resume next?

QuickTest Professional (QTP) Questions and Answers


(Continued from previous question...)

When to use a Recovery Scenario and when to us on error resume next?

Recovery scenarios are used when you cannot predict at what step the error can occur or when you know that error won't occur in your

QTP script but could occur in the world outside QTP, again the example would be "out of paper", as this error is caused by printer device driver. "On error resume next" should be used when you know if an error is expected and dont want to raise it, you may want to have different actions depending upon the error that occurred. Use err.number & err.description to get more details about the error.

(Continued on next question...)

Other Interview Questions