session/session library

Semantic execution contracts for Ensemble tests (observe / act / wait / assert).

Classes

ActionResult
Result of TestExecutionSession.act.
ArtifactRequest
Request to capture a diagnostic artifact.
AssertionResult
ElementBounds
A rectangular region used to narrow a target when labels are ambiguous.
ElementLocator
A semantic or structural description of an element in the current view.
ElementTarget
Identifies an element either from an observation or through a locator.
ObservationCompleteness
What fields were actually populated in this observation.
ObservationOptions
Options for TestExecutionSession.observe.
ScreenObservation
Active screen / navigation slice of a UiObservation.
SessionCapabilities
What a session adapter can honestly provide.
SessionPermissions
What a caller is allowed to invoke on a session.
SourceLocation
Location in the authored test, independent of the parser and Flutter.
TestArtifact
Captured artifact metadata (bytes live outside the JSON contract).
TestExecutionSession
Interface for one isolated app test execution (observe / act / wait / assert).
TestOperation
The only command representation between a compiled plan and its runtime.
TestSessionConfiguration
Configuration for creating a TestExecutionSession.
TestSessionFactory
Abstract factory for standalone sessions.
UiBounds
Axis-aligned bounds in logical pixels.
UiElement
One rendered element in a UiObservation.
UiElementState
UiObservation
Serializable snapshot of the currently rendered UI.
UiObserver
Collects a serializable UiObservation of the live UI.
UiViewport
Viewport size for the observation.
WaitResult

Enums

ActionStatus
AssertionStatus
ObservationDetailLevel
Controls how much UI state an observation is allowed to collect.
ObservationSynchronization
How far to synchronize before capturing a UiObservation.
OperationKind
TestExecutionErrorCode
Structured error codes for TestExecutionSession leaf operations.
WaitStatus

Functions

buildAgentLocatorCandidates(UiElement element, {ElementLocator? parentScope, int? iconOccurrenceAmongSiblings, int? iconSiblingCount}) → List<ElementLocator>
Report locator candidates in preference order.
cheapSuggestedLocator(UiElement element, {ElementLocator? parentScope, int? iconOccurrenceAmongSiblings, int? iconSiblingCount, int? occurrenceAmongSiblings}) → ElementLocator?
First preferred candidate for diagnostic / report snapshots (no finder).
containerScopeLocator(UiElement element) → ElementLocator?
within= scope for descendants — includes non-tappable cards/toasts.
enrichSuggestedLocators({required UiObservation observation, required FlutterTargetResolver resolver, required ObservationRegistry registry}) → UiObservation
Attaches verified UiElement.suggestedLocator values using the live resolver.
formatSuggestedSelector(ElementLocator locator) → String
Compact YAML-mappable form of an ElementLocator for observer output.
mapObservationLocatorTree({required List<UiElement> elements, required ObserverLocatorResolver resolve}) → List<UiElement>
Applies locator resolution to a tree while consistently deriving scopes and sibling occurrences for both live and diagnostic observations.

Typedefs

ObserverLocatorResolution = ({ElementLocator? locator, String? warning})
ObserverLocatorResolver = ObserverLocatorResolution Function({required UiElement element, int? iconOccurrenceAmongSiblings, int? iconSiblingCount, int? occurrenceAmongSiblings, ElementLocator? parentScope})

Exceptions / Errors

TestExecutionError
Machine-readable failure for observe/act/wait/assert results.