Tuesday 7 May 2013

Error Handling in QTP


Error and Exception Handling


Unexpected events, errors, and application crashes during a run session can disrupt the run session and distort results. This is a problem particularly when tests run unattended—the test pauses until one performs the operation needed to recover. To handle such situations, Error and Exception Handling is must while developing script or Automation Framework.

Error and Exception handling can be done by the following ways-
1- Conditional Statement 
2- On Error statement
3- Recovery Scenarios


Error Handling-

Low-level errors in the automation framework are handled using the Error Handling
There are 2 types of Error Handling:-

1-Conditional Statements: Conditionally executes a group of statements, depending on the Run-time QTP error received.

For e.g.- 

2 On error Statements- This causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error.

Following are error statements: 

1. On Error Resume Next
2. On Error Go to 0
3. err.number
4. err.description


On Error Resume Next: On Error Resume Next statement enables the Error handling in the code. If there is error in the code "On error Resume Next" ignores it and continues with next line of code.

On Error Go to 0: On error got to 0 statement disables error handling we have previously enabled it by using On Error resume Next.

err.number and err.description: Provides the error number and the description of the error.

For e.g.-

 

Exception Handling

Recovery Scenario:

When executing scripts we may get some unexpected errors. To recover the test and continue running script from these unexpected errors we use Recovery Scenarios.
A recovery scenario consists of the following:

Trigger Event: The event that interrupts your run session. For example a window that may pop up on screen.

Recovery Operations: The operations to perform to enable QTP to continue running the test after the trigger event interrupts the run session. For example, clicking an OK button in a pop-up window.

Post-Recovery Test Run Option: The instructions on how QTP should proceed after the recovery operations have been performed, and from which point in the test QTP should continue. For example, you may want to restart a test from the beginning, or skip a step entirely and continue with the next step in the test. Recovery scenarios are saved in recovery scenario files having the extension .qrs. A recovery scenario file is a logical collection of recovery scenarios, grouped according to our specific requirements.


Examples of Recovery scenarios -

1-‘Object Not Found’ Run Time Error

Trigger Event: QTP does not locate an object in the application. 
Recovery Operation: QTP invokes Recovery Scenario ‘objectNotFound’.
Post-Recovery Operation: Recovery Scenario tries to locate for the object till the ‘Time Out’ time specified at the Global Library.
a. If the object is located within the Time Out time, QTP performs the current step and execution resumes.
b. If the object is not found within the Time Out time, QTP Exits the Test with Snapshot of the application.


2- 'Any Error' Run Time Error
Trigger Event: Any run-time QTP error besides 'Cannot find the Object....'
Recovery Operation: QTP invokes the Recovery Scenario ‘anyError’.
Post Recovery Operation: QTP exits the current test with the snapshot of the application.


Steps for Creating a Recovery Scenario-

1-Select “Recovery Scenario Manager” from Resources menu-




2-Click on ‘New’ button-


3-Click on “Next” button-


4-Select the “Trigger Event” and then click on Next button



5-In Case of “Trigger Event” as “Pop-up window”, select the window using Hand and then click on Next button- 


6-Select the “Recovery” operation and click on Next button
  


7-In Case of “Recovery” operation as “Keyboard or mouse operation” select the operation and click on Next button-


8-Select the “Post Recovery” options and click on Next button


104 comments:

  1. Thats really quite info to me

    Regarding for Query?

    various types of properties when using Object Identification in
    QTP?

    http://www.bestqtptraining.com/

    ReplyDelete
  2. QTP is a software Testing Tool which helps in Functional and Regression testing of an application. If you are interested in QTP training, our real time working. QTP Training in Chennai

    ReplyDelete
  3. Nice site.... refer this site .if Our vision succes!Training are focused on perfect improvement of technical skills for Freshers and working professional. Our Training classes are sure to help the trainee with COMPLETE PRACTICAL TRAINING and Realtime methodologies. Green Technologies In Chennai

    ReplyDelete
  4. Job oriented Hadoop training in Chennai is offered by our institue is mainly focused on real time and industry oriented. We provide training from beginner’s level to advanced level techniques thought by our experts. Hadoop Training in Chennai

    ReplyDelete

  5. Pega Training in Chennai
    Brilliant article. The information I have been searching precisely. It helped me a lot, thanks. Keep coming with more such informative article. Would love to follow them.

    ReplyDelete
  6. Kits Online Training Institute provides the best online training classes for IT trainings with experienced trainers,really it's impressive thanks for sharing this article.

    Best Oracle DBA Online Training institute From india

    ReplyDelete
  7. Job oriented form_reports training in Chennai is offered by our institue is mainly focused on real time and industry oriented. We provide training from beginner’s level to advanced level techniques thought by our experts.
    forms-reports Training in Chennai

    ReplyDelete

  8. Hai if our training additional way as (IT) trained as individual,you will be able to understand other applications more quickly and continue to build your skll set
    which will assist you in getting hi-tech industry jobs as possible in future courese of action..
    visit this blog webMethods-training in chennai



    ReplyDelete
  9. great article!!!!!This is very importent information for us.I like all content and information.I have read it.You know more about this please visit again.
    QTP Training in Chennai

    ReplyDelete
  10. very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
    Informatica Training in Chennai

    ReplyDelete
  11. Hai you have to learned to lot of information about selenium Gain the knowledge and hands-on experience you need to successfully design,so you have more details visit this site..
    selenium Training in Chennai

    ReplyDelete
  12. n database computing, Oracle Real Application Clusters (RAC) — an option for the Oracle Database software produced by Oracle Corporation and introduced in 2001 with Oracle9i — provides software for clustering and high availability in Oracle database environments. Oracle Corporation includes RAC with the Standard Edition, provided the nodes are clustered using Oracle Clusterware.
    Oracle RAC allows multiple computers to run Oracle RDBMS software simultaneously while accessing a single database, thus providing clustering.

    In a non-RAC Oracle database, a single instance accesses a single database. The database consists of a collection of data files, control files, and redo logs located on disk. The instance comprises the collection of Oracle-related memory and operating system processes that run on a computer system.


    Oracle RAC Training in Chennai

    ReplyDelete
  13. Performance tuning is a broad and somewhat complex topic area when it comes to Oracle databases. Two of the biggest questions faced by your average DBA concern where to start and what to do. All you may know is that someone (a user) reports a problem about a slow or poor performing application or query. Where do you even begin to start when faced with this situation?
    Oracle's emphasis on this particular methodology changed when Oracle9i was released. The approach has gone from top-down in 8i to that of following principles in 9i/10g. Neither methodology is absolute as each has its advantages and disadvantages.

    The Oracle Server is a sophisticated and highly tunable software product. Its flexibility allows you to make small adjustments that affect database performance. By tuning your system, you can tailor its performance to best meet your needs.
    Performance must be built in! Performance tuning cannot be performed optimally after a system is put into production. To achieve performance targets of response time, throughput, and constraints you must tune application analysis, design, and implementation.

    Oracle Performance Tuning Training in chennai



    ReplyDelete
  14. Hyperion Solutions Corporation was an Enterprise Performance Management software company, located in Santa Clara, California, USA, which was acquired by Oracle Corporation in 2007. Many of its products were targeted at the business intelligence (BI) and business performance management markets, and as of 2013 are still actively developed and sold by Oracle as Oracle Hyperion products.

    Group consolidation specialize for finance users are a specialization of BI market. Microsoft Excel is the market leader in this area. The increase in level of Multiway Data Analysis correlate with the cost and time of consolidation. Hyperion Enterprise and Oracle HFM are examples of application to support more complex consolidation requirements.

    Hyperion Training in chennai


    ReplyDelete
  15. GSSSB 2480 Revenue Talati Bharti Recruitment 2016

    First i would like greet author, thanks for providing valuable information.............

    ReplyDelete
  16. Assam 2564 Police Constable Recruitment 2016 Apply Online


    Every day I always visit sites to obtain the best information for materials research I was doing...............

    ReplyDelete
  17. Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
    Hadoop Training In Chennai

    ReplyDelete

  18. Hey,Thank you for sharing such an amazing and informative post. Really enjoyed reading it.


    Cloud Consulting in India

    ReplyDelete
  19. Really awesome blog. Your blog is really useful.
    sas training in chennai

    ReplyDelete
  20. • can any one suggest me about testing training institute with 100 % placement in adyar..
    unix training in chennai

    ReplyDelete
  21. Thanks for the explanation. It’s really helpful. Please keep sharing
    QTP Training in Delhi

    ReplyDelete
  22. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

    python training in omr

    python training in annanagar | python training in chennai

    python training in marathahalli | python training in btm layout

    python training in rajaji nagar | python training in jayanagar

    ReplyDelete
  23. Awesome! Education is the extreme motivation that open the new doors of data and material. So we always need to study around the things and the new part of educations with that we are not mindful.
    java training in chennai | java training in bangalore

    java online training | java training in pune

    java training in chennai | java training in bangalore

    ReplyDelete
  24. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    rpa training in Chennai | rpa training in pune

    rpa training in tambaram | rpa training in sholinganallur

    rpa training in Chennai | rpa training in velachery

    rpa online training | rpa training in bangalore

    ReplyDelete
  25. This comment has been removed by the author.

    ReplyDelete
  26. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.


    rpa training in Chennai | rpa training in velachery

    rpa training in tambaram | rpa training in sholinganallur

    ReplyDelete
  27. Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.
    python training in tambaram
    python training in annanagar
    python training in OMR
    python training in chennai

    ReplyDelete
  28. Thank you for this post. Thats all I are able to say. You most absolutely have built this blog website into something speciel. You clearly know what you are working on, youve insured so many corners.thanks
    java training in tambaram | java training in velachery

    java training in omr | oracle training in chennai

    ReplyDelete
  29. QTP training in bangalore,QTP training in Bangalore offered by Training in Bangalore with 100% placement assistance. Best QTP training in Bangalore with certified experts
    qtp training in bangalore

    ReplyDelete
  30. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    My Sql Dba Training
    Exchange Server Training
    Powershell Training

    ReplyDelete
  31. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.

    Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

    Selenium Training in Bangalore | Best Selenium Training in Bangalore

    AWS Training in Bangalore | Amazon Web Services Training in Bangalore

    ReplyDelete
  32. Awwsome informative blog ,Very good information thanks for sharing such wonderful blog with us ,after long time came across such knowlegeble blog. keep sharing such informative blog with us.
    Aviation Academy in Chennai | Aviation Courses in Chennai | Best Aviation Academy in Chennai | Aviation Institute in Chennai | Aviation Training in Chennai

    ReplyDelete
  33. Great articles, first of all Thanks for writing such lovely Post!

    coursquare
    Article submission sites

    ReplyDelete
  34. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.
    advanced excel training in bangalore

    ReplyDelete
  35. Really great work. Your article was very helpful.Thanks for sharing valuable points.Keep sharing.Thank You
    rpa training in chennai | rpa training in velachery | trending technologies list 2018

    ReplyDelete
  36. Thanks for such a nice article on Blueprism.Amazing information of Blueprism you have . Keep sharing and updating this wonderful blog on Blueprism
    Thanks and regards,
    blue prism training in chennai
    blue prism training institute in chennai
    Blueprism certification in chennai

    ReplyDelete
  37. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
    python course in pune | python course in chennai | python course in Bangalore

    ReplyDelete
  38. I would assume that we use more than the eyes to gauge a person's feelings. Mouth. Body language. Even voice. You could at least have given us a face in this test.

    python interview questions and answers | python tutorialspython course institute in electronic city

    ReplyDelete
  39. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    Java online training | Java Certification Online course-Gangboard

    Java training in Pune

    ReplyDelete
  40. I would assume that we use more than the eyes to gauge a person's feelings. Mouth. Body language. Even voice. You could at least have given us a face in this test.

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs Training in chennai

    automation anywhere online Training

    angularjs interview questions and answers

    ReplyDelete
  41. I wouldn’t mind producing a post or elaborating on some the subjects you write concerning here. Again, awesome weblog!
    iosh course in chennai

    ReplyDelete
  42. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.is article.
    python training in chennai
    python course institute in chennai

    ReplyDelete
  43. This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
    Data Science training in chennai
    Data Science training in OMR
    Data Science training in chennai
    Data Science Training in Chennai
    Data Science training in Chennai
    Data Science training in anna nagar

    ReplyDelete
  44. Thanks a lot for sharing us about this update. Hope you will not get tired on making posts as informative as this.
    Devops Training in Chennai | Devops Training Institute in Chennai

    ReplyDelete
  45. With QuickBooks Payroll Support Phone Number it is simple to fill most of the Federal forms simply by few clicks and send them to your appropriate federal agencies. QuickBooks payroll assisted, intuit files and pays the taxes for your needs.

    ReplyDelete
  46. If this doesn’t help you, go ahead and connect to us at QuickBooks Support Number The majority of us works 24*7 and serve its customers with excellent service each time they e mail us. It doesn't matter what issue is and however complex it truly is, we assure you that individuals offers you optimal solution as quickly as possible.

    ReplyDelete
  47. we're able to manage your entire QuickBooks Enterprise accounting for your needs. So as to make your QuickBooks Enterprise Support Phone Number contact us at an get related to us in minutes. before calling us, all you have to do is always to make sure that you have a very good web connection and you're clearly competent to here us clearly before calling us. You are able to cherish our above-mentioned beneficial services at the most affordable price on just a call.

    ReplyDelete
  48. QuickBooks Premier is very simple to utilize but errors may usually pop up at the time of installation, at the time of taking backup, while upgrading your software to your latest version etc. The support team at QuickBooks Payroll Support Phone Number is trained by well experienced experts that are making our customer service executives quite robust and resilient. It really works twenty-four hours every single day with just one part of mind for instance. to fix the issues faced by our customers in less time without compromising aided by the quality of services.

    ReplyDelete
  49. The QuickBooks Technical Support Phone Number is present 24/7 to produce much-needed integration related support also to promptly make use of QuickBooks Premier with other Microsoft Office software applications.

    ReplyDelete
  50. If you come with any issue which many of us is just not conscious of then it`s not most likely a challenge for the team as it's quick and sharp to locate out from the issue and resolving it straight away. Go right ahead and e mail us anytime at QuickBooks Payroll Support USA.

    ReplyDelete
  51. Using the introduction of modern tools and approaches to QuickBooks 247 Support Phone Number, you can look at new methods to carry out various business activities. Basically, it offers automated several tasks that were being done manually for a long time. There are many versions of QuickBooks and every one has its very own features.

    ReplyDelete
  52. Because this software is becoming a catalyst to apply more sophisticated tools and equipment with all the improvement in accounting software technology. Thus, it’s natural to tackle each one of these tech glitches with the best accounting software. You can easily troubleshoot QuickBooks errors with the Intuit QuickBooks support by dialing our QuickBooks Enterprise Support.

    ReplyDelete
  53. QuickBooks has almost changed it is of accounting. Nowadays accounting has exploded to become everyone’s cup of tea and that’s only become possible because because of the birth of QuickBooks accounting software. We have the best and the most convenient answer to enhance your productivity by solving every issue you face with the software. Give us a call at QuickBooks Support Phone Number to avail the greatest customer service services designed for you.

    ReplyDelete

  54. Our QB Experts are pretty knowledgeable about all of the versions of QuickBooks Enterprise Technical Support released on the market till now by Intuit. So be it selecting the most appropriate version of QB Enterprise to your requirements or assessing the sorts of errors which can be usually encountered to the various versions of QB Enterprise.

    ReplyDelete

  55. For many for the small or mid-sized businesses companies, QuickBooks Tech Support Phone Number is usually been the essential challenging task to efficiently manage the business enterprise accounts in an authentic and proper way by simply obtaining the best and proper solutions.

    ReplyDelete
  56. QuickBooks Support Phone Number Premier really is easy to make use of but errors may usually pop up during the time of installation, during the time of taking backup, while upgrading your software to your latest version etc.

    ReplyDelete
  57. Reach us at QuickBooks Tech Support Number at and experience our efficient tech support team of many your software related issues. If you are aa QuickBooks enterprise user, you're able to reach us out immediately at our QuickBooks Support contact number .

    ReplyDelete
  58. Encountering a slip-up or Technical break down of your QuickBooks Customer Service Number or its functions can be associate degree obstacle and put your work on a halt. this can be not solely frustrating however additionally a heavy concern as all of your crucial information is saved on the code information.

    ReplyDelete

  59. QuickBooks Support Phone Number advisors are certified Pro-advisors’ and has forte in furnishing any type of technical issues for QuickBooks. They have been expert and certified technicians of the domains like QuickBooks accounting,QuickBooks Payroll, Point of Sales, QuickBooks Merchant Services and Inventory issues to provide 24/7 service to our esteemed customers.

    ReplyDelete
  60. QuickBooks is present for users around the globe even though the best tool to provide creative and innovative features for business account management to small and medium-sized business organizations. If you’re encountering any type of QuickBooks’ related problem, you will definately get all of that problems solved simply by using the Intuit QuickBooks Phone Number.

    ReplyDelete
  61. QuickBooks Support contact number has too much to offer to its customers to be able to manage every trouble that obstructs your projects. You will find loads many errors in QuickBooks such as difficulty in installing this software, problem in upgrading the software in the newer version so that you can avail the most up-to-date QuickBooks features, trouble in generating advanced reports, difficulty with opening company file in multi-user mode and so on and so forth. Whatever the issue is, if it bothers you and deters the performance within your business, you may have to not get back seat and gives up, just dial us at our toll-free number and luxuriate in incredible QuickBooks Tech Support Number.

    ReplyDelete
  62. Since QuickBooks Tech Support Phone Number is an propel software with numerous technicalities involved with it. Once in a while, it is hard for clients to handle the specialized issues that emerge with it and that is the reason we have a group of Experts to determine all you’re bookkeeping questions and issues.

    ReplyDelete
  63. The error might occur due to invalid security certificate and when user tries to send data in multi-user mode. It may also takes place due to low speed internet with no web connection. QuickBooks Payroll Technical Support Number Connection Error is just like the Payroll Server Error.

    ReplyDelete
  64. Your info is really amazing with impressive content..Excellent blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog..
    If you are looking for any Big data Hadoop Related information please visit our website Big Data Hadoop Training In Bangalore page!

    ReplyDelete
  65. Thanks for sharing your innovative ideas to our vision. I have read your blog and I gathered some new information through your blog. Your blog is really very informative and unique. Keep posting like this. Awaiting for your further update. If you are looking for any Python programming related information, please visit our website python training institute in Bangalore

    ReplyDelete
  66. Oh wow helpful data..
    Thanks for sharing with us,
    We are again come on your website,
    Thanks and good day,
    If you need any logo then,
    Please visit our site,
    buylogo

    ReplyDelete
  67. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
    oracle training in chennai

    oracle training in tambaram

    oracle dba training in chennai

    oracle dba training in tambaram

    ccna training in chennai

    ccna training in tambaram

    seo training in chennai

    seo training in tambaram

    ReplyDelete
  68. great article!!!!!This is very importent information for us.I like all content and information.I have read it.You know more about this please visit again.
    java training in chennai

    java training in omr

    aws training in chennai

    aws training in omr

    python training in chennai

    python training in omr

    selenium training in chennai

    selenium training in omr

    ReplyDelete