Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exception Handling thorugh Descritpive Programming.
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
Is there a way in QTP handle Exceptions using Descritpive Programming.
If yes, please let me know the code to do so.
Reply
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
What Kind Of Exceptions ? and why only through DP ?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Solved: 11 Years, 4 Months, 4 Weeks ago
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.
Reply
#4
Solved: 11 Years, 4 Months, 4 Weeks ago
If the object handling is same, The DP should work in QTP too..
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#5
Solved: 11 Years, 4 Months, 4 Weeks ago
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.
Reply
#6
Solved: 11 Years, 4 Months, 4 Weeks ago
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.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#7
Solved: 11 Years, 4 Months, 4 Weeks ago
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
Reply
#8
Solved: 11 Years, 4 Months, 4 Weeks ago
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.

Reply
#9
Solved: 11 Years, 4 Months, 4 Weeks ago
I am aware of 'Recovery scenario manager' and I guess we have to live with it then.

Thanks Saket.
Reply
#10
Solved: 11 Years, 4 Months, 4 Weeks ago
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.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] SelectRow and Exception robertosalemi 1 2,527 03-23-2016, 10:36 PM
Last Post: robertosalemi
  External component has thrown an exception. mharps 1 7,146 05-28-2014, 10:07 AM
Last Post: mharps
  Sample code: Search thorugh a Folder Halemani 0 2,142 08-17-2012, 06:15 PM
Last Post: Halemani
Exclamation RE: QTP - Exception Handling Unleash Rajesh 2 5,060 07-05-2011, 08:54 PM
Last Post: rajpes
  Exception Handling in QTP sudhirzpatil 2 13,027 12-22-2010, 10:05 AM
Last Post: sudhirzpatil

Forum Jump:


Users browsing this thread: 3 Guest(s)