as well, you can also try to get page source from the driver(driver.getPageSource()) which my benefit when encountering into a problem.
I would recommend to record the test since it is hard to know the exact moment to take a snapshot because there might have been previous actions that you would like to know about in addition to a screenshot only on failure.