return encodeBase64(image);
}
private void writeScreenshotFileName(XmlNode target, String encodedImage, String imageFileName) {
XmlNode screenshotNode = target.parentNode().addNewNode(SCREENSHOT_ELEMENT);
screenshotNode.addAttribute(name(SCREENSHOT_FILE_ATTRIBUTE).value(imageFileName));
screenshotNode.addText(encodedImage);
}
private String imageFileName(String testClass, String testMethod) {
return join(testClass, testMethod, PNG).with(".");