Skip to content

E2E

API reference

The core. Agent, Screen, Expect, the engines, model clients, config, and the replay cache.

Type Summary
ActionEvent One completed action of an agent.act step, as OnAction receives it.
ActionOptions Options for one locator action.
ActOptions Values passed into one CancellationToken) goal. Put fresh data in Unique(string).
ActResult
Agent One goal (CancellationToken)) or a check against the current screen.
AgentAttribute Pins the agent that the calls of a test, or of every test in a class, use when they name none. Upstream’s agent option of test and describe. The closest pin wins: a call’s Agent, then the method, then the class, then an enclosing or base class, then the E2EAGENT environment variable. Base and enclosing classes count although the attribute is not inherited: TestAgentOptions reads each layer itself. An unknown name fails the test with INVALIDARGUMENT.
AgentConfig One entry of agents. Upstream model and judge are AI SDK instances; here they are model ids for Provider, which share BaseUrl and ApiKeyEnv. Each entry starts from the defaults; none inherits another’s values.
AgentContextAttribute Appends facts only this test knows to the context of every agent, after the agent’s own context. Upstream’s agentContext option of test and describe. Layers join outer to inner, one per line. Keep instructions out of it: it reaches the judges too.
AgentException An agent step failed, was blocked, or could not talk to its model.
AgentOptions One named agent, as upstream agents.. Each entry starts from the built-in defaults; no agent inherits another’s values. A call picks one with its Agent option.
AgentTool A project tool the agent offers to the model beside its own: upstream’s defineTool. It declares whether it changes the application and which platforms it is offered on; the agent owns dispatch and accounting. The tool’s name is its key in Tools.
AgentToolContext What a project tool reaches of the step it runs in (upstream’s ToolContext): a look at the screen, and a screenshot kept as evidence of the step. A tool that changes the app may not look: it observes in a separate call.
AnthropicModel Anthropic Messages API client. The system prompt and the newest message carry cache breakpoints, as upstream marks them, so each turn of a tool loop reads the previous turn’s prefix from the cache.
AnthropicModelOptions
App Opens and resets the app under test. A relative URL is resolved against BaseUrl; no URL opens the base URL.
AppConfig
AssertOptions agent.assert: one judgment and one repair round, within Timeout.
AwsCredentials AWS access key credentials for Signature Version 4.
BedrockModel Amazon Bedrock Converse API client. It signs with AWS Signature Version 4 from the standard AWS environment variables, or sends a Bedrock API key (AWSBEARERTOKENBEDROCK) as a bearer token when one is set.
BedrockModelOptions
Browser The browser the attempt drives, showing one active tab. It needs an engine session that implements IBrowserSession, such as WebEngine; on any other engine each member fails with UNSUPPORTEDCAPABILITY.
BrowserExpect Polling assertions for the Browser: its URL and its title. Like the locator matchers, a passing one verifies the previous agent.act. A read is bounded by the matcher’s own deadline, so a page that stops answering ends the assertion at its timeout.
BrowserKeyboard Keyboard input for whatever holds focus in the active tab. A call the page does not answer within the action timeout fails with ACTIONMAYHAVECOMMITTED: the input may have reached the page.
BrowserMouse Pointer input for the active tab, in CSS pixels. A call the page does not answer within the action timeout fails with ACTIONMAYHAVECOMMITTED: the input may have reached the page.
BuiltInAgentOptions What the built-in agent is built from: an agents entry’s system and its tools (upstream’s BuiltInAgentOptions).
CacheConfig
CacheEntry A recording of one verified act. Its file name is the hash of a trace cache key (TraceCacheKeyHash): the cache schema, the replay policy version, the project, the test, the target, the engine’s name and contract version, the app’s identity, the instruction’s and params’ digests, the agent’s name, a digest of the agent’s redacted context, and which repeat of that same call in the attempt it is. The model id and the engine’s package version are not part of the key.
CacheInfo
CacheLookup
ClickOptions What a tap-family action takes. Upstream’s ClickOptions, of which the port has the modifiers.
CommandConfig The command a target’s app.command starts the app with (upstream’s CommandConfig). It is a program and its arguments, never a shell line: the executable is started directly and each argument is passed as it is.
ConfigurationException e2e.config.json is invalid. The code is INVALIDCONFIG.
Credentials Reads E2EUSER{NAME}USERNAME and E2EUSER{NAME}PASSWORD. The name is uppercased and dashes become underscores.
DefaultAgent Upstream’s createBuiltInAgent (agent/default-agent.ts): the tool loop with the built-in rules, tools, and opening prompt.
E2EConfig The resolved e2e.config.json. The JSON shape follows upstream e2e.config.ts: targets[].app.url, named agents, top-level timeouts in milliseconds, retries, cache, and secrets. Unknown keys fail with INVALIDCONFIG. E2ETest finds and applies this file; a fixture can still override each value. There is no default model.
E2EDefaults The upstream defaults, in one place. E2EConfig, E2ESessionOptions, and the NUnit fixture all start from these values.
E2EException Base exception for the agent and engines. Code is stable.
E2EFixture The part of a test base class that every test framework shares. It holds the settings and starts one E2ESession per test. A framework adapter, such as E2E.NUnit.E2ETest, calls MethodBase) before the test body and commits the session from the framework’s result after it.

Settings come from Config, the nearest e2e.config.json above the test assembly or the working directory. Override a property to change one value for a fixture.

E2ESession One test attempt: an engine session, the fixtures, and the replay cache. Call CancellationToken) after the test body. Disposing without CancellationToken) records the attempt as failed.
E2ESessionOptions How to open one E2ESession. Retries set Attempt above 1 so the cache records but does not replay, except under CacheStrict, where every attempt replays.
EngineErrorCodes Stable engine error codes, as in the upstream engine contract.
EngineException The engine refused an operation or could not drive the app.
ErrorDetails Structured facts of one failure, beside its prose message (upstream’s ErrorDetails, internal/errors.ts). An assertion carries what it expected and observed and how many nodes matched. A locator failure carries the locator as written, what it asked for, and how long it waited. A report bounds the text fields.
ExecutorAttempt The attempt a step belongs to: identity and lifecycle. It lets an executor keep state across the ActAsync calls of one test, a running conversation or a plan or notes, without mixing it with the next test’s or a retry’s.
ExecutorModelCall Usage detail of one model call an executor made. Every field is optional.
ExecutorNode One node of the redacted semantic tree. Names, text, values, and attribute values are secret-redacted, and a secure node carries no value at all. Id is the node’s ref in the observation, which an action names it by.
ExecutorObservation A redacted, size-bounded observation an executor may show its model.
ExecutorObserveOptions What an executor asks CancellationToken) to include beyond the text.
ExecutorPixels Masked viewport pixels cleared for model input: the engine’s capture, sized for the model, and its proven mask count.
ExecutorSecret A secret declared in a step’s params: its stable name and what it is for. Never its value.
ExecutorStep One step handed to an executor. An Act plans and executes a flow. An Assert judges a condition and must not change the app.
ExecutorTarget A node named by its id from the newest observation (upstream’s { id }). The id is the node’s ref in the text and in Id. A ref the screen no longer lists fails the action instead of acting on the wrong node.
ExecutorTargetInfo The target a step runs on. Tools scope themselves by Platform, and Verbs is the part of the action grammar the engine declared, so an executor offers a model exactly the vocabulary the surface can honor.
Expect Polling assertions for a Locator, expect.soft, and expect.poll. A passing locator assertion verifies the previous agent.act. Plain value matchers are not ported: use NUnit Assert.That, and Assert.EnterMultipleScope for soft value checks.
Explore An exploration: a run whose one test is a goal. The config is loaded as a test run loads it, the exploration body runs as the run’s only test, and within that test alone the explorer takes the place of the agent the run uses. The exploration’s progress reaches OnProgress, and its record is Explore.
ExploreBounds<T> The least, the most, and the default of a bound option. Upstream’s inline { min, max, default }.
ExploreBudgets What an exploration was given to spend: its step cap and its wall clock.
ExploreExecutor The explorer: the built-in agent with exploration guidance appended to the project’s and one tool added to the project’s vocabulary, reportfinding. Nothing else changes: budgets, loop guards, wind-down, secrets, origin policy, and the transcript are the harness’s, and each exploration step runs as one ordinary ActAsync step.
ExploreOptions What CancellationToken) explores, as, and with.
ExploreOutcome What an exploration ended with. Upstream’s ExploreOutcome, which extends the runner’s RunOutcome.
ExploreProgress The exploration’s progress, one moment at a time: the step in progress, each finding the moment it is reported, and the end. ReportExplore is the record; these are its moments. Upstream carries them as explore run events, which its list reporter renders; the port has no run events, so OnProgress receives them.
ExploreProgress.FindingReported One finding, as recorded; its evidence screenshot, when kept, is the one ArtifactId names. Upstream’s finding phase.
ExploreProgress.Finished
ExploreProgress.Planning The planner is deciding the next charter, or (Closing) the assessment that ends the run.
ExploreProgress.Started The exploration begins: its test has started and the app is about to open.
ExploreProgress.StepFinished
ExploreProgress.StepStarted
ExtractOptions agent.extract: one extraction and one repair round. The type argument of CancellationToken) is the schema.
FileStepCache JSON files in a directory, one per cache key. Entries over 1 MiB are ignored.
FrameScreen The screen scope FrameLocator(string) returns. Every Screen query answers from inside the frame, and the web-only escape hatches follow it in: Locator(string) for a CSS or XPath selector on a control with no accessible name, and FrameLocator(string) for a frame nested inside this one. Upstream’s FrameScreen.
GoogleModel Google Gemini API (Generative Language) client. Tool schemas go as parametersJsonSchema, so the agent’s JSON Schemas need no conversion. Thought signatures Gemini attaches to a function call are sent back with it.
GoogleModelOptions
GotoOptions Options of CancellationToken).
Locator A query that resolves against a fresh observation every time it is used.
LocatorExpect Matchers that retry until they pass or the assertion timeout elapses. Each takes an optional timeout that replaces the assertion timeout for that call.
LocatorExpression A locator expression. Query kinds (role, text, label, testid, placeholder, displayValue) search the descendants of Parent when it is set. filter and index narrow Source. union matches either Left or Right, each node once, in document order. selector is a CSS or XPath selector in the engine’s own language, and frame scopes Source into the iframe Selector names.
LocatorWaitForOptions Options for CancellationToken).
ModelImage An image a model reads: the encoded bytes of a screenshot, already sized for the model.
ModelMessage
ModelProviders Ready-made models for the providers upstream’s e2e init and docs name, each reading the key from the environment variable the AI SDK reads. Subscription logins are in Subscriptions.
ModelRequest
ModelResponse
ModelResponses Builds the tool calls a ScriptedModel (or a test) returns.
ModelTool
ModelToolCall
ModelUsage
OpenAiCompatibleModel Chat-completions client for OpenAI and any server that speaks the same tool-call JSON. Set BaseUrl to a local server such as http://127.0.0.1:11434/v1. The API key is optional for servers that do not check one. ModelProviders has presets for OpenRouter, the Vercel AI Gateway, SpaceXAI, and Ollama.
OpenAiCompatibleModelOptions
OpenAiResponsesModel OpenAI Responses API client: OpenAI itself, Azure OpenAI (String)), and the subscription backends that only speak Responses. Nothing is stored server side, so each turn carries the whole conversation. A server-sent-event answer is folded back into the completed response.
OpenAiResponsesModelOptions
OpenedStep A step as opened: title and charter bounded to the report’s ceilings, which is what the step runs with.
PollExpectation<T> Re-reads a value until the chosen matcher holds or the timeout passes. A read that throws is retried, and its error is reported if the poll times out. A matcher that refuses the read value’s type counts as not yet. With NUnit, ToMatchAsync from E2E.NUnit takes any NUnit constraint.
PollOptions How PollOptions) re-reads a value.
PreparedMessages What PrepareMessages hands back: the history for the next turn, and optionally a reason to stop. The executor has evidence the loop guards cannot see that the step is not progressing. A stop leaves the model only done, like a loop guard.
PreparedTurn What PrepareMessages learns about the turn that is about to run.
PressSequentiallyOptions Options for CancellationToken).
RecordedAction
RecordedTarget
ReplayedPrefix Upstream’s ReplayedPrefix: the mid-step hand-off from a diverged cache replay. The replayed actions already ran against the live app under the same budgets and recording as the executor’s own. The executor continues the step from the current state and does not redo them.
ReportExplore What an exploration was asked, did, and found: upstream’s run.explore block of the report.
ReportExploreFinding One finding Explore recorded through its reportfinding tool.
ReportExploreStep One exploration step: a charter the agent planned and then executed as an ActAsync step.
ResolvedRecording One effective mode and where it came from. Upstream ResolvedRecording.
RoleOptions Role query options. A null state is not checked.
Screen Semantic queries against the current screen. An action or a single-node assertion fails when the query matches more than one node. Narrow it with Filter(TextMatch), First(), Last(), or Nth(int).
ScreenExpect Matchers on the whole screen: String).
ScreenshotOptions Options of ToHaveScreenshotAsync.
ScriptedModel Returns whatever the callback decides for each request. Records every request.
ScrollUntilVisibleOptions Options for Screen.ScrollUntilVisibleAsync and Locator.ScrollUntilVisibleAsync.
Secret A value the model must not see. Prompts, transcripts, reports, and the names and test ids an act records in its replay cache entry receive secret:name. The agent fills the real value itself.
Secrets The secrets declared in e2e.config.json. Each value comes from E2ESECRET{NAME} when it is set, else from the config. The name is uppercased and every character other than A-Z and 0-9 becomes an underscore.
SkipException Thrown by String) when a test stops early and is reported skipped.
SoftBrowserExpect The browser matchers of BrowserExpect, but an ASSERTIONFAILED is kept on the session instead of thrown, as SoftLocatorExpect does.
SoftLocatorExpect The locator matchers of LocatorExpect, but an ASSERTIONFAILED is kept on the session instead of thrown, and the test body runs on. Any other error, such as STRICTMODE, still throws.
StepExecutorContext What an executor receives for one step (upstream’s StepExecutorContext). The runtime builds it. A test of an executor can build its own and override the members it reads: each one that does work throws until it is overridden.
StepExecutors Upstream’s RUNTIMECODES, BLOCKABLECODES and isRuntimeHardStop (agent/executor.ts).
StepTurn One model turn of an agent step: the tool calls the model made and what came back, each bounded (upstream’s StepTurn).
TargetConfig One entry of targets. The port drives the web, ios, and android platforms.
TestContext The fixtures for one test. Call String) before the first step when a precondition is missing.
TestException A locator, expectation, or test failed.
TestFilterCandidate One test a filter may leave out: what names it, never its body (upstream’s TestFilterCandidate).
TestFilterChanges What a run’s test filters judge: every file that differs from the base commit (upstream’s TestFilterChanges).
TestFilterContext What the host hands a filter besides its tests (upstream’s TestFilterContext).
TestFilterResult A filter’s answer: every test it does not name runs (upstream’s TestFilterResult).
TextMatch A string or a regular expression, the upstream TextMatch, used by both screen queries and expectations. In a query, a string matches exactly by default, and exact: false makes it a case-insensitive substring; a Regex is tested against the whitespace-normalized text and ignores exact. Converts implicitly from both.
TextMatchOptions Options shared by the text-matching queries.
ToolLoop Upstream’s createToolLoopExecutor (agent/tool-loop.ts): the chassis of an executor that thinks in a loop of model turns and tool calls. It owns everything but the tool vocabulary: the done verdict tool and its closed code policy, the hard stops (a spent budget, a timeout, or a cancel ends the loop, never the model), the loop guards, the shrink of a history that overflowed the model, and the count of model calls. The built-in agent is this chassis plus the grammar tools (CreateBuiltInAgent(BuiltInAgentOptions)). An executor for a device or an API brings other tools and inherits the same discipline.
ToolLoopExecutorOptions Upstream’s ToolLoopExecutorOptions.
ToolLoopHelpers Loop services for the tool bodies that run work of their own (upstream’s ToolLoopHelpers).
ToolLoopTool One tool of a loop’s vocabulary: what the model is told, and what runs when it calls it. Upstream’s tools are AI SDK tools, which the port has no counterpart of, so this is the .NET shape of one entry of its ToolSet. A tool that throws is read by the model as a failed call, except a hard stop of the step, which ends the loop.
TraceKeyContext Upstream’s TraceKeyContext (cache/trace.ts): every part of a cache key outside the step’s own identity, as it was when a step was recorded. An entry stores it as keyedBy: provenance, never read by a replay. When a step’s key no longer finds the entry, comparing it with the run’s says what changed.
UniqueValue A value that changes every run, such as a timestamp or a fresh email. The replay cache treats every UniqueValue as the same param and substitutes the current value when it types.
UserCredential Username plus a Secret password loaded from the environment.
Values Wraps a fresh value so the replay cache can still match the step.
WaitForOptions agent.waitFor: a judgment at most once per Interval, and only on a changed screen, until Timeout.
WebResponse A response CancellationToken) matched.
WebRoute One request a CancellationToken) handler intercepted. Take exactly one decision. Each validates its options before it decides, so a rejected option leaves the request undecided, and the request is aborted.
Type Summary
StepVerdict Upstream’s StepVerdict: how an executor ended the step. Failed means the app did not behave as the step required. Blocked means the environment, the credentials, or the executor’s own budget prevented a verdict about the app, and it always carries a blockable code.
ToolLoopResult What a tool call answered: the text the model reads, and whether the call failed, which the loop counts toward its failure streak.
Type Summary
IAgentModel One turn of the agent model. Tool calls are executed by the agent, never by the model itself.
IExecutorActions Upstream’s ExecutorActions, with the verbs the port’s engines support. Every verb bottoms out in the runtime, which enforces the deadline and the action budget and records the action for the step’s cache entry. A ref is only valid against the newest observation: a stale one fails the action rather than acting on the wrong node. Actions and observations run in call order. An engine failure is thrown as an E2EException, and a hard stop of the step as an AgentException with a runtime code. CancellationToken) is a verb the port’s grammar has and upstream’s does not (upstream clears with type).
IExecutorBudgets Step budgets, read and reported by the executor and enforced by the runtime.
IStepCache
IStepExecutor Upstream’s StepExecutor (agent/executor.ts): the part of an act step that thinks. The runtime owns the step’s cache, budget, deadline, and verdict; an executor reads the screen, acts through the context, and returns a verdict. Swapping executors changes the thinking, never the safety, the budgets, or the verdict grammar.

An executor is trusted project code, in the same trust domain as the test project that builds it: it may hold its own model and credentials. What the runtime enforces against it is accounting, not secrecy: the budgets, the deadline, the recording, and the verdict grammar hold whoever thinks.

ITestFilter Leaves collected tests out of a run before anything starts (upstream’s TestFilter, types.ts). A host that selects tests calls it through TestFilters.ApplyTestFilters, at most once. A call that throws, returns an invalid result, or runs past 5 minutes leaves nothing out. .NET-only: the interface prefix and the Async suffix.
Type Summary
ActionSource Who chose an action an ActionEvent reports.
AppLogLevel How bad a line the app logged was.
AppLogSource Where a line the app logged came from (upstream’s AppLogSource).
CacheMode How the replay cache is used.
ExecutorCache Trace-cache participation for an executor’s steps. Upstream’s cache: ‘inherit’ | ‘off’.
ExecutorStepKind Upstream’s ExecutorStep.kind.
ExecutorVerb One verb of IExecutorActions. The port has the verbs its engines can perform.
GotoWaitUntil When CancellationToken) counts a navigation as done.
RecordingMode Which attempts of a test record a trace or a video. Upstream RecordingMode. In e2e.config.json and in E2ETRACE and E2EVIDEO a mode is written off, on, retain-on-failure, on-first-retry, or on-all-retries.
RecordingSource Where an effective RecordingMode was set. Upstream RecordingSource. A Run mode (the config root or the environment variable) applies to every engine that can record. A Target or Test mode was asked for by name, so the engine must be able to record it.
ReplayHandOffReason Upstream’s ReplayHandOffReason, why a cached replay stopped before it finished its trace. ActionBudget and InvalidEntry are the port’s: its replay draws on the step’s action budget, and reads a recording back from a store that can hold any shape.
ReportExploreEnded Why an exploration stopped.
ReportExploreFindingKind Whether a finding fails the exploration.
ReportExploreStepStatus How an exploration step ended.
ReportRunStatus How a run ended (upstream’s BuildReportOptions[‘status’] | ‘blocked’).
RunStatus How a run ended. Upstream’s RunStatus, with the values a single run in the port can have.
StepVerdictStatus Upstream’s StepVerdict.status.
VisionDegradation Why a vision call fell back to tree-only input. Pixel evidence degrades rather than fails, except under Only, which fails with POLICYDENIED naming the reason.
VisionMode What evidence a judgment (CancellationToken), CancellationToken), CancellationToken)) is given: the semantic tree, a masked screenshot of the current screen, or both.

Only exists because a tree sent beside pixels is a cheaper path to an answer, and a model takes it: asked whether a form is covered by an overlay, it can read from the tree that the form is present and named and answer yes, while the pixels show the overlay. For a judgment about what the screen presents, the tree is a distractor, so the mode that means it removes it. It also costs fewer input tokens than On.

In every mode that sends pixels and the tree, pixel evidence degrades away rather than failing the call when it cannot be proven redacted. Only has nothing to degrade to, so it fails with POLICYDENIED instead of answering the wrong question from the tree.

CancellationToken) takes no vision mode: the act model works from the tree.

WaitForState The state CancellationToken) waits for.
Type Summary
ActionHook The onAction hook of an agent.act call.
ExploreListener Receives every change of the exploration, in order.