Chapter 6. Event and Exception Handling

In this chapter, we will cover the following recipes:

  • Catching errors inside a function or subroutine
  • Creating and using a recovery scenario
  • Using a global dictionary for recovery

Introduction

The topic of exception handling is extremely important, because the robustness of an automation suite affects its reliability. An automated test may fail due to unhandled and unexpected events, such as the appearance of a pop-up dialog or window, an application crash, or a runtime error (for example, due to poor quality code or an object description that is outdated). If you do not consider such possibilities while designing your scripts, then it will reflect on your ability to rely on the suite and accordingly reduce the ...

Get Advanced UFT 12 for Test Engineers Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.