Issue: iOS real device test recording shorter than intended

what? I do stop like:

String recordingResult = ((CanRecordScreen) driver).stopRecordingScreen();
// after this
byte[] decoded = Base64.getDecoder().decode(recordingResult);
// finally do save into needed file
FileUtils.writeByteArrayToFile(new File(getVideoFileLocation()), decoded);

This method is deprecated but I got nonsense of my question just now :laughing:
I am adding that base64 in Extent Report but its not opening there.
Do you have a solution as to what can i do with the video in terms of uploading it?

what method deprecated?
https://javadoc.io/doc/io.appium/java-client/latest/io/appium/java_client/screenrecording/CanRecordScreen.html#stopRecordingScreen()


The Field START_RECORDING_SCREEN used with execute in startRecordingScreen() method

Can we attach the recording to Extent Report. I know you did it with Allure. Can you provide your implementation of that?

    @Attachment(value = "VideoFile", type = "video/mp4", fileExtension = ".mp4")
    public byte[] attachVideoToAllure(String videoFileLocation) {
        Logger.log("path to file: '" + getVideoFileLocation() + "'");
        synchronized (this) {
            File video = new File(videoFileLocation);
            try {
                return Files.toByteArray(video);
            } catch (IOException e) {
                Logger.logError("FAILED\n" + e.getMessage());
                return new byte[0];
            }
        }
    }