Class RecordManager

java.lang.Object
com.shaft.gui.internal.video.RecordManager

public class RecordManager extends Object
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 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, or null to 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

      public static void attachVideoRecording(Path pathToRecording)
      Attaches an existing video recording file to the current report.
      Parameters:
      pathToRecording - path to the recording file; null is ignored
    • attachVideoRecording

      public static void attachVideoRecording()
      Stops the active recording, if any, and attaches it to the current report.
    • getVideoRecordingFilePath

      public static String 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

      public static InputStream getVideoRecording()
      Stops the active desktop or Appium-native recording and returns its bytes.
      Returns:
      an input stream for the recording, or null when no recording is active or available