Hi,
I have two BDD scenarions, first BDD for UI screen which has code to takes screen shot for Pass/fail BDD step. However,Second BDD is about to API steps automation. If we find API test case failure then failure step shows screenshot of earlier last screen shot of first BDD step.
As quick work around you can cleanup screenshot in step listener before execute method.
TestBaseProvider.instance().get().setLastCapturedScreenShot("");
Most helpful comment
As quick work around you can cleanup screenshot in step listener before execute method.
TestBaseProvider.instance().get().setLastCapturedScreenShot("");