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.
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 UFT (QTP). I recommend you to subscribe by Email and have new UFT articles sent directly to your inbox.