General Run Error in QTP

Many times  QTP throws “General Run Error” without any other details.It is always easy to debug if the system throws the appropriate error message.So how to get such error description?

QTP provides a Utility statement called DescribeResult to get the error description.

The syntax is DescribeResult(Error), argument is integer and return value is String

You can get the error number by Err.Number

So to see the description of the error,insert a watch like DescribeResult(Err.Number) in the debug pane or store it in a variable and analyze the error to fix the issue.

There are many such Utility Statement,to uncover more such utility statement go to

QuickTest Professional Help File–>QuickTest Object Model  Reference –> Utility Objects –> Utility Statements


2 thoughts on “General Run Error in QTP

    1. @ritesh
      Err.Description is VB Script description property,where as DescribeResult is QTP’s object model.In case of general run error err.description will not give you the description of the error.
      For example MsgBox (“Error # ” & CStr(Err.Number) & ” ” & Err.Description) this will not give the error description on General run error
      Dhanasekar S

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s