Skip to content

Commit a2ad57e

Browse files
anna-shchurokAnna Shchurok
andauthored
Fix issue#97 (#98)
Co-authored-by: Anna Shchurok <anna_shchurok_tp@bmc.com>
1 parent 843bd27 commit a2ad57e

File tree

1 file changed

+1
-3
lines changed
  • src/main/java/com/assertthat/selenium_shutterbug/core

1 file changed

+1
-3
lines changed

src/main/java/com/assertthat/selenium_shutterbug/core/Snapshot.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public T withName(String name) {
5858
*/
5959
public T withTitle(String title) {
6060
this.title = title;
61+
image = ImageProcessor.addTitle(image, title, Color.red, new Font("Serif", Font.BOLD, 20));
6162
return self();
6263
}
6364

@@ -221,9 +222,6 @@ public void save() {
221222
if (!Files.exists(location)) {
222223
screenshotFile.mkdirs();
223224
}
224-
if (title != null && !title.isEmpty()) {
225-
image = ImageProcessor.addTitle(image, title, Color.red, new Font("Serif", Font.BOLD, 20));
226-
}
227225
FileUtil.writeImage(image, EXTENSION, screenshotFile);
228226
}
229227

0 commit comments

Comments
 (0)