Have you looked PopUp method of shell object...
Hope you will be able to modify / add the logic according to your need..
I donot have qtp rightnow.. Recovery Scenario(if activated see Recovery.Activate ) is somewhat like a a polling mechansim waiting for a signal( for example: OnError, as highlighted in above post) , once it catches the signal it executes the chosen action by the user ( a function call in this case) , hope post revoery , Continue to Next Step should work in your case... , however I am not sure if you would be able to correct the error in your qtp resources during this pause.. but definitely you can find what the error was ... DescribeError statement will prob bring the last error in qtp.. or we can use for Err.Source, Err.Number and Err.Description and log these using the your logging function...Try Using these Error statements in Information bar/Debug View during this pause...
Note: As a best practice we use RecoveryScenario to handle unknown errors, however if you know that a statement is likely to cause an error then use On Error Resume Next and don not forget to put On Error goto 0 after catching the Err.Number and Err.Description
Best Regards,
Jiten
Code:
Shell=CreateObject("Wscript.Shell")
iMessageType = 0
Select Case sStatus
Case "Fail"
iMessageType = 16
Case "Warning"
iMessageType = 48
Case Else
iMessageType = 64
End Select
iResult = Shell.PopUp(sMessage , 5 , "Your message ", iMessageType)
'press the OK button to pause the script.
If iResult = 1 Then
'paused then vbscript message box
MsgBox sOriginalMessage & vbCrLf & vbCrLf & "Automation Paused - Press OK to continue", , "Script Paused By User"
end if
Hope you will be able to modify / add the logic according to your need..
I donot have qtp rightnow.. Recovery Scenario(if activated see Recovery.Activate ) is somewhat like a a polling mechansim waiting for a signal( for example: OnError, as highlighted in above post) , once it catches the signal it executes the chosen action by the user ( a function call in this case) , hope post revoery , Continue to Next Step should work in your case... , however I am not sure if you would be able to correct the error in your qtp resources during this pause.. but definitely you can find what the error was ... DescribeError statement will prob bring the last error in qtp.. or we can use for Err.Source, Err.Number and Err.Description and log these using the your logging function...Try Using these Error statements in Information bar/Debug View during this pause...
Note: As a best practice we use RecoveryScenario to handle unknown errors, however if you know that a statement is likely to cause an error then use On Error Resume Next and don not forget to put On Error goto 0 after catching the Err.Number and Err.Description
Best Regards,
Jiten