Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error Handling
#1
Solved: 10 Years, 9 Months ago
Hi Angur,

We have to use Error handing in our qtp frame work. we are using keyword driven frame work.can you give one examble code for error handling? please, urgent.
Reply
#2
Solved: 10 Years, 9 Months ago
Well my name is Ankur ...

For error handling...we need to know the type of error you are expecting... if you know before hand an error can occur at certain point of the script you can use "On Error Resume next" and then use err object as per your requirement OR if you don't know at which point your error may occur,during execution of script, you should use Recovery Scenarios.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 10 Years, 9 Months ago
Hi Ankur,
Thank you very much. Your blog and articals are very useful to us.Actually we want good error handling in professional qtp framework. We are using "On error Resume Next" and capturedesktopimage and report.filter to report the error message to qtp output file. Apart from this, we want better error handling.Can you give sample code for good error handling?. How we improve our frame work with better error handling? can you tell me about Err.object? we tried On error goto 0, On error goto <label>: qtp is not recognized these.
Reply
#4
Solved: 10 Years, 9 Months ago
Hai Ankur
You are doing Great job.I read some matrial from this forum. it is really very nice and helpful.
In our company we are going to implement the framework.I am using on Error Resume Next for error handling. But compare to our coding these lines are more. For this pupose Java has try-catch block. (if error occur in block of code it automatically call one error handling function)same like is there any posibility in QTP. can we simulate same functionality here. can u help me for this.it will be helpful for me.
Reply
#5
Solved: 10 Years, 9 Months ago
Hi Esha,
In java,you use Try-catch block where you have doubt or where you find any possibility to get error,beforehand.Similarily,in QTP also you can use Err object wherever you feel that you might get error.The basic purpose is same.It will simply move the control out of that error part.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to write scripts with error handling mechanism UFT_Newbie 2 2,861 08-14-2014, 07:09 PM
Last Post: UFT_Newbie
  Taking screenshots during Error handling arpan 0 1,577 11-05-2013, 11:57 PM
Last Post: arpan
  Secure QTP Code and Error Handling Scenario. knarravu 0 4,081 11-02-2010, 12:40 AM
Last Post: knarravu
  Test Error Handling scenarios and create an Error Log file which document the step wh test123 0 2,533 04-10-2008, 12:50 PM
Last Post: test123

Forum Jump:


Users browsing this thread: 1 Guest(s)