How to take screenshot on test failure with junit 5
<p>Can someone tell me please: how to take a screenshot when test method  fails (jUnit 5). I have a base test class with <code>BeforeEach</code> and <code>AfterEach</code> methods. Any other classes with @Test methods extends base class.</p>