Table of Contents

Class InferenceOptions

Namespace
Cress.Recorder.Inference
Assembly
Cress.Recorder.dll

Controls how StepInferenceEngine processes a sequence of RecordedEvent objects into InferredStep objects.

public sealed record InferenceOptions : IEquatable<InferenceOptions>
Inheritance
InferenceOptions
Implements
Inherited Members

Properties

AssertionTargetAutomationId

When set, ValueChanged events (and PropertyChanged events carrying a new value) on the element whose AutomationId matches this string are emitted as AssertText steps rather than SetValue steps. For Calculator this is "CalculatorResults". Only applies when Domain is Desktop.

public string? AssertionTargetAutomationId { get; init; }

Property Value

string

DebounceWindow

Identical consecutive events within this window are collapsed to a single event. Identity is defined as: same EventKind + same element RuntimeId + same Value / Key. Defaults to 50 ms (conservative; avoids double-event noise without hiding real repeated clicks).

public TimeSpan DebounceWindow { get; init; }

Property Value

TimeSpan

Domain

The recording domain. Defaults to Desktop to preserve backward-compatible behaviour for all existing tests and workflows.

public InferenceDomain Domain { get; init; }

Property Value

InferenceDomain

IgnoreFocusEvents

When true (default), FocusChanged events are discarded. Focus events are almost always noise and rarely correspond to a user-visible action.

public bool IgnoreFocusEvents { get; init; }

Property Value

bool

TargetProcessId

When set, events whose Element ProcessId does not match are discarded before inference. Leave null to accept events from all processes.

public int? TargetProcessId { get; init; }

Property Value

int?

WebDebounceWindow

Debounce window applied to consecutive ValueChanged events on the same element when Domain is Web. Human typing has natural inter-key pauses longer than the desktop debounce window, so a longer window (250 ms default) collapses a "hello" keystroke stream into one fill. The last value in the window is kept (not the first, unlike the standard debounce).

public TimeSpan WebDebounceWindow { get; init; }

Property Value

TimeSpan