Skip to content

Commit 5d232ec

Browse files
committed
fixed screenshot filename issue with timestamp
1 parent bc7aa2b commit 5d232ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/io/github/mfaisalkhatri/utils/ScreenshotListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void onTestFailure (final ITestResult result) {
2828
String filename = timestamp + ".png";
2929
try {
3030
Files.createDirectories (Paths.get ("screenshots"));
31-
Files.copy (screenshot.toPath (), Paths.get ("screenshots", testName, filename));
31+
Files.copy (screenshot.toPath (), Paths.get ("screenshots", testName+"_"+filename));
3232
} catch (IOException e) {
3333
throw new RuntimeException (e);
3434
}

0 commit comments

Comments
 (0)