Class RecordManager
java.lang.Object
com.shaft.gui.internal.video.RecordManager
Orchestrates SHAFT video recording for desktop browsers and Appium native sessions.
Desktop recording is delegated through DesktopVideoRecordingProvider; Android and iOS recording remain
driver-native so mobile users do not need the optional desktop video implementation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidStops the active recording, if any, and attaches it to the current report.static voidattachVideoRecording(Path pathToRecording) Attaches an existing video recording file to the current report.static InputStreamStops the active desktop or Appium-native recording and returns its bytes.static StringStops the active recording, writes it to SHAFT's temporary video path, and returns that path.static voidStarts desktop screen recording when video recording is enabled for local non-headless execution.static voidstartVideoRecording(org.openqa.selenium.WebDriver driver) Starts Appium-native recording for mobile execution or falls back to desktop recording for local desktop drivers.
-
Method Details
-
startVideoRecording
public static void startVideoRecording(org.openqa.selenium.WebDriver driver) Starts Appium-native recording for mobile execution or falls back to desktop recording for local desktop drivers.- Parameters:
driver- the active WebDriver instance, ornullto request desktop recording directly
-
startVideoRecording
public static void startVideoRecording()Starts desktop screen recording when video recording is enabled for local non-headless execution.- Throws:
IllegalStateException- when desktop recording is requested but no desktop provider is available
-
attachVideoRecording
Attaches an existing video recording file to the current report.- Parameters:
pathToRecording- path to the recording file;nullis ignored
-
attachVideoRecording
public static void attachVideoRecording()Stops the active recording, if any, and attaches it to the current report. -
getVideoRecordingFilePath
Stops the active recording, writes it to SHAFT's temporary video path, and returns that path.- Returns:
- the temporary file path, or an empty string when no recording can be written
-
getVideoRecording
Stops the active desktop or Appium-native recording and returns its bytes.- Returns:
- an input stream for the recording, or
nullwhen no recording is active or available
-