--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to a topic in the Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cukes/ne6SIX_tlIw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Can I make this work with JAVA?
import org.openqa.selenium.TakesScreenshot
import org.openqa.selenium.OutputType
...
After() { ScenarioImpl scenario ->
if (scenario.failed) {
byte[] screenshot = ((TakesScreenshot) driver)?.getScreenshotAs(OutputType.BYTES)
scenario.embed(screenshot, "image/png")
}
...String fileName0 = "Feature# " + featureValue + "; Scenario# " + scenario.getName();
String fileName1 = fileName0.replace("-", " ");
String fileNameWithoutDate = fileName1 + "_" + ".png";
byte[] bytes = ((TakesScreenshot)driver).getScreenshotAs(OutputType.BYTES)
scenario.embed(bytes, fileNameWithoutDate);