Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exception handler parameters
#1
Not Solved
Hello guys

I am using the below function (which is there in my Lib) mapped in the QTP exception handler to overcome any kind of error that happens in the AUT
at run-time. This function will simple mark the test as “Aborted due to application crash or object recognition problem” and carry on
with execution of next action which is in pipe line.

I am using Object.GetToProperty() to capture the object details which caused the error, but I am unsure of how to use
Rest of the parameters like “Method”, “Arguments”, and “retVal”

Some help on this would be much appreciated.

'************** This is my function *************************
Code:
Function Application_Crash(Object, Method, Arguments, retVal)

DataTable("Error_Source", dtGlobalSheet) = "(Name = " & Object.GetToProperty("name") & ") - " & " (Type = " & Object.GetToProperty("type") & ") - " & "( HTML Tag = " & Object.GetToProperty("html tag") & ") - " & " (Inner Text = " & Object.GetToProperty("innertext") & ")"

Call Get_TestResult(Test_Name, "Aborted due to application crash or object recognition problem")

Call Kill_IE()

Call Launch_Application()

End Function 
'************* End of function **************************
Reply
#2
Not Solved
Hi,

The author of this function might have an idea of keeping all thin info like the method, Arguments and retVal but he never used them in the function. So probably you can pass then as empty stings ("") and the scripts will execute without any issues.

If you want to use all the above function inputs then we should know what type of framework you guys are using, so that we can provide a solution.

Let me know if you need any further info.
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  optional parameters Ishul 5 7,757 04-03-2012, 11:18 PM
Last Post: supputuri
Exclamation how to Pass Optional Parameters in VBS? ShrikantBiradar3449 1 7,916 06-13-2011, 03:12 AM
Last Post: Skepsis
  Get parameters of action idolast 0 2,533 07-02-2008, 08:52 PM
Last Post: idolast

Forum Jump:


Users browsing this thread: 1 Guest(s)