diff --git a/agent/src/main/java/com/microsoft/hydralab/agent/runner/TestRunDeviceOrchestrator.java b/agent/src/main/java/com/microsoft/hydralab/agent/runner/TestRunDeviceOrchestrator.java index 8c27e2f9a..a0b193703 100644 --- a/agent/src/main/java/com/microsoft/hydralab/agent/runner/TestRunDeviceOrchestrator.java +++ b/agent/src/main/java/com/microsoft/hydralab/agent/runner/TestRunDeviceOrchestrator.java @@ -128,18 +128,18 @@ public void startScreenRecorder(@NotNull TestRunDevice testRunDevice, @NotNull F } public String stopScreenRecorder(@NotNull TestRunDevice testRunDevice, @NotNull File folder, @Nullable Logger logger) { + List videoFilePaths = new ArrayList<>(); if (testRunDevice instanceof TestRunDeviceCombo) { - List videoFilePaths = new ArrayList<>(); ((TestRunDeviceCombo) testRunDevice).getDevices().forEach(testRunDevice1 -> { String path = testRunDevice1.getScreenRecorder().finishRecording(); if (path != null && !path.isEmpty()) { videoFilePaths.add(path); } }); - return FFmpegConcatUtil.mergeVideosSideBySide(videoFilePaths, folder, logger).getAbsolutePath(); } else { - return testRunDevice.getScreenRecorder().finishRecording(); + videoFilePaths.add(testRunDevice.getScreenRecorder().finishRecording()); } + return FFmpegConcatUtil.mergeVideosSideBySide(videoFilePaths, folder, logger).getAbsolutePath(); } public void startNetworkMonitor(@NotNull TestRunDevice testRunDevice, String rule, File resultFolder, @Nullable Logger logger) {