Interface IStudioRecorderService
Testability seam for the studio-side recording service. The real implementation wraps RecordingSession; tests substitute a mock.
public interface IStudioRecorderService
Properties
CapturedEventCount
Number of events captured in the active session so far.
int CapturedEventCount { get; }
Property Value
CurrentEvents
The raw events captured so far in the active session. Empty when not recording. Thread-safe snapshot on each access.
IReadOnlyList<RecordedEvent> CurrentEvents { get; }
Property Value
CurrentInferredSteps
Live inference applied to CurrentEvents. Recomputed on each StateChanged tick (~250 ms debounce). Empty when not recording.
IReadOnlyList<InferredStep> CurrentInferredSteps { get; }
Property Value
CurrentTarget
The target that is currently being (or was last) recorded.
RecordingTargetInfo? CurrentTarget { get; }
Property Value
Elapsed
Elapsed time since recording started.
TimeSpan Elapsed { get; }
Property Value
IsRecording
True while a recording session is active.
bool IsRecording { get; }
Property Value
Methods
ListAvailableTargetsAsync()
Returns running processes that have a visible main window and can be attached to. Silently skips elevated/protected processes.
Task<IReadOnlyList<RecordingTargetInfo>> ListAvailableTargetsAsync()
Returns
ReplayRecordedFlowAsync(string, string)
Loads the flow at flowFilePath and executes it in-process using the
project rooted at projectPath. Returns pass/fail + step summary.
Never spawns an external process.
Task<RecordingReplayResult> ReplayRecordedFlowAsync(string flowFilePath, string projectPath)
Parameters
Returns
StartRecordingAsync(int)
Attaches to processId and starts capturing events.
Task StartRecordingAsync(int processId)
Parameters
processIdint
Returns
StartWebRecordingAsync(string, string, CancellationToken)
Spawns the Node.js web recorder, opens a browser at url,
and starts streaming web events.
Task StartWebRecordingAsync(string url, string browserType, CancellationToken ct = default)
Parameters
urlstringInitial URL to navigate to (must be a valid absolute URL).
browserTypestringBrowser to launch: "chromium", "firefox", or "webkit".
ctCancellationTokenOptional cancellation token.
Returns
StopRecordingAsync()
Stops the active session and returns the inferred steps plus raw events.
Task<RecordingResult> StopRecordingAsync()
Returns
Events
StateChanged
Fires when recording state changes (start/stop/new event). Debounced to ~250 ms so rapid UIA event streams don't spam Blazor renders.
event Action? StateChanged