Micro Focus QTP (UFT) Forums
Exception Handling thorugh Descritpive Programming. - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Exception Handling thorugh Descritpive Programming. (/Thread-Exception-Handling-thorugh-Descritpive-Programming)

Pages: 1 2


Exception Handling thorugh Descritpive Programming. - prabhu656656 - 08-27-2009

Is there a way in QTP handle Exceptions using Descritpive Programming.
If yes, please let me know the code to do so.


RE: Exception Handling thorugh Descritpive Programming. - basanth27 - 08-27-2009

What Kind Of Exceptions ? and why only through DP ?


RE: Exception Handling thorugh Descritpive Programming. - prabhu656656 - 08-27-2009

Hi Basanth,

Actually we are trying to Migrate WR scripts to QTP Scripts.
We have a tool that handles almost everything.
But since we have used DP to handle Exceptions in WR, we are just trying to find out a way to do the same in QTP so as to save effort which should be put into creating Recovery scenarios.

Please let me know incase you need more information w.r.t the same.


RE: Exception Handling thorugh Descritpive Programming. - basanth27 - 08-27-2009

If the object handling is same, The DP should work in QTP too..


RE: Exception Handling thorugh Descritpive Programming. - prabhu656656 - 08-27-2009

True Basanth..but we also used certain inbuilt WR functions for the same to handle the Exceptions
Functions List:
define_tsl_exception
define_popup_exception
exception_on
exception_off_all
exception_off

and now we are not sure as to what can be used as alternative in QTP.


RE: Exception Handling thorugh Descritpive Programming. - basanth27 - 08-27-2009

Prabhu -
If you can define the scenario of your function list usage and what each does then maybe i can co-relate it with QTP.


RE: Exception Handling thorugh Descritpive Programming. - prabhu656656 - 08-27-2009

Hi Basanth, mentioned below are the details:[/b]

1. define_tsl_exception: function defines a simple recovery scenario for a TSL exception event. A TSL exception event is a TSL return value that can cause an interruption in the test run.

2. define_popup_exception: function defines a simple recovery scenario for a pop-up exception event. A pop-up exception event is a window that pops up during the test run and interrupts the test.

3.exception_on: function enables detection and handling of a previously defined recovery scenario. During test execution, WinRunner will detect and recover from an exception only if you have activated the recovery scenario before the exception occurs.

4. exception_off: function disables the detection of the specified recovery scenario. To enable exception handling, use the exception_on function.

5.exception_off_all: function disables all previously activated recovery scenarios.

Please see if you can help me thorugh. Thank You


RE: Exception Handling thorugh Descritpive Programming. - Saket - 08-27-2009

In QTP, 'Recovery scenario manager' takes care of all exception. You can call your user defined function through this and enable and disable recovery as well. Learn about Recovery Scenario Manager in QTP help.


RE: Exception Handling thorugh Descritpive Programming. - prabhu656656 - 08-27-2009

I am aware of 'Recovery scenario manager' and I guess we have to live with it then.

Thanks Saket.


RE: Exception Handling thorugh Descritpive Programming. - basanth27 - 08-27-2009

What Saket Meant is,

1. You can associate your function file to a recovery scenario. Read throughly and you can see that it can be implemented with less re-work.