I want to add images to my PDF reports, without using the functions:
Mobile.takeScreenshot()
WebUI.takeScreenshot()
Etc.
I want to add images to my PDF reports, without using the functions:
Mobile.takeScreenshot()
WebUI.takeScreenshot()
Etc.
Hi,
I cannot find any information about this. It seems like you cannot do so
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!