public boolean requireScreenshot ( final ExtendedSeleniumCommand command , boolean result ) { return ( ! command . isAssertCommand ( ) && ! command . isVerifyCommand ( ) && ! command . isWaitForCommand ( ) && screenshotPolicy == ScreenshotPolicy . STEP ) || ( ! result && ( screenshotPolicy == ScreenshotPolicy . FAILURE || ( command . isAssertCommand ( ) && screenshotPolicy == ScreenshotPolicy . ASSERTION ) ) ) ; }
Is a screenshot desired based on the command and the test result .