10-07-2009, 10:03 AM
Quote:
A object not found in repository will never cause an error as QTP treats it at a level of syntax error in the script which does not fire any kind of recovery scenario and always are thrown by QTP. And i believe QTP will also not catch x = 2/0 which is a division by zero error as they are caught in VBScript.
QTP can only fire a recovery scenario if the statment involves a QTP Test object (excluding object not in OR)
Try this
X = 2 / 0 'Will not activate the scenario. Click skip for this
Browser("asdsdsdsad").close 'Will not activate the scenario...click skip for this
Browser("name:=asdhasdgsja").close 'this will activate the recovery scenario.
QTP is not firing Recovery Scenario on statement
Browser("name:=asdhasdgsja").close
1.Scenario
>> Test Run Error(Error - Any error)
>> Recovery (Function Call - RecoveryFunction1)
>> Post recovery option - Repeat current step and continue
2.My function(testing purpose)
Function RecoveryFunction1(Object)
Msgbox "Jitesh1"
End Function
It is not displaying message box "Jitesh1" for Browser("asdsdsdsad").close
Make sure i have attached correspond recovery scenario in the test.
Post Extras: Print Post Remind Me! Notify Moderator
A object not found in repository will never cause an error as QTP treats it at a level of syntax error in the script which does not fire any kind of recovery scenario and always are thrown by QTP. And i believe QTP will also not catch x = 2/0 which is a division by zero error as they are caught in VBScript.
QTP can only fire a recovery scenario if the statment involves a QTP Test object (excluding object not in OR)
Try this
X = 2 / 0 'Will not activate the scenario. Click skip for this
Browser("asdsdsdsad").close 'Will not activate the scenario...click skip for this
Browser("name:=asdhasdgsja").close 'this will activate the recovery scenario.
QTP is not firing Recovery Scenario on statement
Browser("name:=asdhasdgsja").close
1.Scenario
>> Test Run Error(Error - Any error)
>> Recovery (Function Call - RecoveryFunction1)
>> Post recovery option - Repeat current step and continue
2.My function(testing purpose)
Function RecoveryFunction1(Object)
Msgbox "Jitesh1"
End Function
It is not displaying message box "Jitesh1" for Browser("asdsdsdsad").close
Make sure i have attached correspond recovery scenario in the test.
Post Extras: Print Post Remind Me! Notify Moderator