Interface DesktopVideoRecordingProvider


public interface DesktopVideoRecordingProvider
SHAFT-owned contract for desktop screen-recording implementations.

Implementations may use optional recording and encoding libraries, but callers in shaft-engine interact only with JDK and SHAFT-owned types through this interface.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Reports whether this provider is recording on the current test thread.
    void
    Starts recording the desktop for the current test thread.
    stopRecording(boolean testPassed, String recordingName)
    Stops the active desktop recording and returns its encoded contents.
  • Method Details

    • startRecording

      void startRecording()
      Starts recording the desktop for the current test thread.
    • stopRecording

      InputStream stopRecording(boolean testPassed, String recordingName)
      Stops the active desktop recording and returns its encoded contents.
      Parameters:
      testPassed - whether the current test passed, used by providers that conditionally retain recordings
      recordingName - unique name to use when saving the recording
      Returns:
      the encoded recording, or null when no recording is available
    • isRecording

      boolean isRecording()
      Reports whether this provider is recording on the current test thread.
      Returns:
      true when a desktop recording is active; otherwise false