Situation: I have a popup window that will generate a list of data. I will then try to select(click) a specific data from the list generated.
However, sometimes the data will fail to materialise, due to reasons or another, thus TestProject cant find the XPATH of the data.(which is parameterised based on the data in the first place)
I was recently trying out the advance option ‘Recovery Test’, which I presume was supposed to allow us to handle failures; so Im trying to make is so that if the list of data fail to materialise, meaning I cant click on the wanted data, to close the popup and proceed as usual.
Thing is…TestProject is sometimes too smart for its own good and thus proceeds to “fix” the path instead, which naturally leads to unexpected behaviours.
While I dont mind the auto-fix at times, for this specific case, I explicitly want the issue to fail and to go to the Recovery Test I set.
Please try to set the “Adaptive Wait” to a shorter time.
You can edit the Adaptive Wait time globally for your test from the test’s settings:
This is how you can change specific step Adaptive Wait first, disable “Use Test Default” (inherits from test settings) then choose a custom behavior:
Tried as per suggested.
Still resulted in below, which is what I’m trying to avoid:
This is the Recovery Test option that I’m trying to run, if the first error screenshot above is hit:
The self-heal above does not seem to run my Recovery Test script
Please try to edit the element like in the image below:
Delete all locators except the first one:
Let me know if it helped.
As per suggested:
But is it normal for the Recovery Test to go back a step?
It went: Step 18(open popup) → 19(type search parameter) → 20 (click on search button) → 21 (click on result) → Fail → Recovery Test(I think. It closes the popup at least) → 20 (???) → Error
I was on the assumption it was supposed to go: Step 18 → 19 → 20 → 21 → Fail → Recovery Test → 22?
Im not sure if it going back a step is the typical Recovery Test behavior or a result of the change.
If you don’t want to repeat the failed step after running the recovery test, you can set it here: