private static final KeywordLogger logger = KeywordLogger.getInstance(this.getClass())
static void attachImageToReport(String imagePath, LogLevel logLevel, String description = '') {
String absolutePath = Paths.get(imagePath).toAbsolutePath().toString()
Map<String, String> attributes = new HashMap<>()
attributes.put(StringConstants.XML_LOG_ATTACHMENT_PROPERTY, absolutePath)
logger.logPassed(description, attributes)
}
¡This code solve my problem!