I want to test web-application with the use of Pytest and Selenium. I want to capture screenshots only when a test method fails. I have the following fixture: