I am using the MSpec test framework/runner and the Selenium Web Driver. I want to take a screenshot whenever a test fails and saves it so that I can see the error later. I am thinking there can be two possibilities:
- Does MSpec have an assertion-failed event? Something like the cleanup interfaces?
- Does Selenium have some kind of failure event that can automatically take the screenshot?
Can anyone please tell me if you have done something similar and how?
There is a similar question answered already here but my scenario is different. I don't want to modify my tests and put a try catch there in every test.