12-09-2011, 02:52 PM
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 *************************
'************* End of function **************************
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