Skip to content

Commit e707681

Browse files
committed
fine tune embedded screenshots to be link to detailed screenshot
1 parent 8df5864 commit e707681

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/javafxlibrary/keywords/Keywords/ScreenCapturing.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,15 @@ public Object captureImage(Object locator, boolean logImage){
121121
String encodedImage = Base64.getEncoder().encodeToString(imageBytes);
122122
imageFile.delete();
123123

124-
RobotLog.html("<img src=\"data:image/png;base64," + encodedImage + "\" width=\"" + printSize + "px\">");
124+
RobotLog.html("<a href=\"" + path + "\">"
125+
+ "<img title=\"Click for full size image\" src=\"data:image/png;base64," + encodedImage + "\" width=\"" + printSize + "px\">"
126+
+ "</a>");
125127

126128
} else {
127129
// diskonly option
128-
RobotLog.html("<img src=\"" + path + "\" width=\"" + printSize + "px\">");
130+
RobotLog.html("<a href=\"" + path + "\">"
131+
+ "<img title=\"Click for full size image\" src=\"" + path + "\" width=\"" + printSize + "px\">"
132+
+ "</a>");
129133
}
130134
}
131135
return mapObject(image);
@@ -218,7 +222,6 @@ private static Image resizeImage(Image image, Path path) {
218222
if (width < 800)
219223
return image;
220224

221-
RobotLog.html("Full resolution image can be found from <a href=" + path + " >" + path + "</a>.");
222225
double multiplier = width / 800;
223226
try {
224227
String url = path.toUri().toURL().toString();

0 commit comments

Comments
 (0)