If you have worked on QTP for some time you might have encountered errors like “General Run Error” which does not give any details regarding the error and testers often resort to using hit-and-try method to get the problem solved.
Instead, you can write a simple command to get the error number using err object. Just include this piece of code after the line where error occurred.

msgbox Err.Number

This will throw the number code of the error. Now in all probability this error would not be documented in QTP’s help VB Script Run time Error Reference. (Otherwise QTP would not have thrown it “General”) Simply Google this error code and you can get the details and possibly how to resolve it.

If you want to keep track of further articles on QTP. I recommend you to subscribe via RSS Feed. You can also subscribe by Email and have new QTP articles sent directly to your inbox.

Please use QTP forum for posting QTP questions.