Recovery Scenario - "Proceed to Next Iteration" Not working
Based on my script, I mostly have two kinds of error (Note - I cannot predict error because it depends on how fast is application. If servers are very slow, I may get errors as shown below due to synchronization issue.)
1. Object is disabled
2. Object not identified
I decided to handle them through Recovery Scenario so that when script is unattended and such error occurs, it does NOT stop the process of creating multiple test data.
Trigger - Test run error
Error - Object is disabled
Recovery Operation - Keyboard or mouse operation
Select keyboard or mouse operation - Press key or key combination (Ctrl + Left). So that qtp selects "stop" button on Run Error dialogue thrown by QTP
Post Recovery - Proceed to Next test iteration
Patel1332 (Error triggers here). Was expecting QTP to skip this Test Data
Pauly3262 Post Recovery - Was expecting QTP to use this Test Data
Current Behavior - Nothing happens. QTP just running.....
Please note that I created Recover Scenario, save it as .qrs and finally Test>Setting>Recovery to add the recovery scenario to current test.
Last edited by JwalantBhatt0602; 03-10-2016 at 11:40 AM.
Please see another attachment.
Please reply. I am really looking forward for your help. I could not find any relevant post or topics online.
My main challenge is when trigger occurs (QTP run error - Object not found or object is disabled), how should I instruct QTP so that
1. QTP skips the current test data
2. QTP works on next test data available in data table
What should be my approach?
Should be it be as mentioned in my original post?
Should be it be different i.e. calling function while this trigger occurs (calling function to instruct QTP that when this error occurs skip the current test data, increase the count by 1 and move it to next test data in data table; something like that??)
You don't need the use CTRL+L to press the Stop key,
Originally Posted by mwsrosso
Thank you for your reply. Please see below. May I have your insight through the issue and have your advise little more please?
Let's imagine that we are running an automation script. While executing script, we got a QTP Run Time error that "Object is disabled". Let's say object is a "Next" button. When Run Time error occurred, we have to manually stop the script, make some changes in the script and re-run OR if script is okay, we simply Rerun it.
This is exactly I want to do if I schedule my script in the night time. If such error is occurred and if my script was executing third row from the datatable, what I need is
1. Script should Rerun the current test data (third row)
2. It should skip the Third row test data and start executing 4th row.
In Recovery Scenario, UFT does give an option "Post Recovery - Proceed to Next test iteration". I have used this option. It seems that QTP is handling Run Time error because I don't see that Run Time error any more. However, it is NOT moving to Next Test Data (4th row). It simply stop the script.
Please let me know if you have any question.
Last edited by JwalantBhatt0602; 03-11-2016 at 12:38 PM.
Just to make a note:
If I execute my script after Recovery Scenario, the script will again try to execute from the top row of datatable which are already consumed and that is not correct.