Results 1 to 2 of 2

Thread: How do we know which error is generated?

  1. #1
    Expert Member
    Join Date
    Oct 2006
    Answers
    209

    How do we know which error is generated?

    I know that there are 3 kinds of errors...1. Generated by QTP 2. Generated by Script and 3. Genetated by AUT. How do we know which error is generated by QTP or Script or AUT?

    NOTE : [This question was asked by Joelu]


  2. #2
    Expert Member
    Join Date
    Jan 2007
    Answers
    211

    Re: How do we know which error is generated?

    'error handling for vbscript errors
    on error resume next

    if err.number <> 0 then
    msgbox err.description, vbokonly, err.number
    err.clear
    end if
    'error handling for qtp internal errors
    if getlasterror <> 0 then
    msgbox(describeresult(getlasterror))
    end if

    for application errors you have to use the api of your aut. But this is not everywhere available/possible

    Regards,
    Nawab

    Last edited by NawabShaikh; 02-28-2008 at 07:09 AM. Reason: Alignment and Signature

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact