Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Error Details in QTP
#4
Not Solved
I believe you are clearing the error values when you call the function. If this were a normal function, you could pass it the Err object and I think you would preserve your error information. Since this function is triggered by an error in the script and you can't control the parameters (I don't think you can), I don't think this is going to work.

In the QTP 10 help, you can find "Recovery Scenario Wizard, Function screen" and it will show you useful info on creating a recovery functiton. It says that the recovery function for a test run error has the first parameter as an object that represents the object that had the error. One of this object's attributes is "Result" which is defined as "The actual method's results". I'm guessing that this is probably your error number.

After you select a function library, choose one of the following options:

Select function. Choose an existing function from the function library you selected.
Only functions that match the prototype syntax for the trigger type selected in the Select Trigger Event Screen are displayed.

Following is the prototype for each trigger type:

Test run error trigger
OnRunStep
(
[in] Object as Object: The object of the current step.
[in] Method as String: The method of the current step.
[in] Arguments as Array: The actual method's arguments.
[in] Result as Integer: The actual method's result.
)

Pop-up window and Object state triggers
OnObject
(
[in] Object as Object: The detected object.
)

Application crash trigger
OnProcess
(
[in] ProcessName as String: The detected process's Name.
[in] ProcessId as Integer: The detected process' ID.
)

Reply


Messages In This Thread
Getting Error Details in QTP - by chetandahale - 09-30-2010, 05:48 PM
RE: Getting Error Details in QTP - by tdevick - 02-23-2011, 01:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Find System details on which uft license is utilized Ccma 1 1,238 04-24-2018, 02:16 PM
Last Post: Ankur
  Runtime variables details amitmanekar91 0 2,264 03-07-2015, 08:27 PM
Last Post: amitmanekar91
  How to get the details of the current test instance from ALM HARINSUBRU 0 2,532 09-17-2014, 08:09 PM
Last Post: HARINSUBRU
  Details of Log tracking in qtp11 sowmya 0 4,140 01-25-2012, 01:43 PM
Last Post: sowmya

Forum Jump:


Users browsing this thread: 2 Guest(s)