if (scenario.isFailed()) { WebDriver augmentedDriver = new Augmenter().augment(WebConnector.getInstance().getBrowser()); byte[] screenshot = ((TakesScreenshot) augmentedDriver).getScreenshotAs(OutputType.BYTES); scenario.embed(screenshot, "image/jpeg"); WebConnector.getInstance().getBrowser().
}