Skip to content

Commit 4feb790

Browse files
Charankumar HCharankumar H
authored andcommitted
Handled Colon character for screenshot file upload to Github Artifacts.
1 parent 67df1b7 commit 4feb790

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/io/swaglabs/portal/qa/listeners/WebTestListeners.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private void takeScreenshot(ITestResult testResult) {
6868
String directory = testResult.isSuccess() ? "passed_screenshots" : "failed_screenshots";
6969
String timestamp = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss").format(new Date());
7070
String parameter = extractSafeParameter(testResult);
71-
String fileName = formatScreenshotFileName(statusPrefix, testName, parameter, timestamp);
71+
String fileName = formatScreenshotFileName(statusPrefix, testName, parameter, timestamp).replaceAll(":", "_");
7272
String dirPath = Paths.get(WebPortalConstants.SCREENSHOT_FILE_LOCATION + "/pages/", directory).toString();
7373
String filePath = Paths.get(dirPath, fileName).toString();
7474
try {

0 commit comments

Comments
 (0)