App
Namespace: E2E
public sealed class AppOpens and resets the app under test. A relative URL is resolved against BaseUrl; no URL opens the base URL.
Inheritance: object
Properties
Section titled “Properties”BaseUrl
Section titled “BaseUrl”public string? BaseUrl { get; }The target base URL relative URLs resolve against, or null when the test declares none.
Value: string
Methods
Section titled “Methods”BackAsync(CancellationToken)
Section titled “BackAsync(CancellationToken)”public Task BackAsync(CancellationToken cancellationToken = default)Goes back one entry in the history. With no earlier entry it does nothing.
Parameters
| Name | Type | Description |
|---|---|---|
cancellationToken |
CancellationToken |
Returns: Task
ClearStateAsync(CancellationToken)
Section titled “ClearStateAsync(CancellationToken)”public Task ClearStateAsync(CancellationToken cancellationToken = default)Discards cookies, storage, and history, and reopens the app at BaseUrl.
Parameters
| Name | Type | Description |
|---|---|---|
cancellationToken |
CancellationToken |
Returns: Task
OpenAsync(string?, CancellationToken)
Section titled “OpenAsync(string?, CancellationToken)”public Task OpenAsync(string? url = null, CancellationToken cancellationToken = default)Opens a path or URL, resolved against the base URL. No URL opens the base URL itself.
Throws APP_URL_REQUIRED for a relative URL when the test declares no base URL, and POLICY_DENIED
for a malformed URL or a scheme other than http: or https: (the exact about:blank is admitted).
Parameters
| Name | Type | Description |
|---|---|---|
url |
string | |
cancellationToken |
CancellationToken |
Returns: Task
RestartAsync(CancellationToken)
Section titled “RestartAsync(CancellationToken)”public Task RestartAsync(CancellationToken cancellationToken = default)Closes the current document and reopens the app at BaseUrl. Cookies and storage are kept.
Parameters
| Name | Type | Description |
|---|---|---|
cancellationToken |
CancellationToken |
Returns: Task