BrowserPage Class

A page of a WebAppBrowser: navigate it, act on its elements, and check the result.

public sealed class BrowserPage : TestPage
Inheritance
TestPage BrowserPage

Properties

NameDescription
BrowserGets the browser of the page.

Gets the browser of the page.

public WebAppBrowser Browser { get; }

Property value

WebAppBrowser

Methods

NameDescription
GoBackAsync(CancellationToken)Goes back in the history, and waits until the page is loaded. Does nothing at the first entry of the history.
GoForwardAsync(CancellationToken)Goes forward in the history, and waits until the page is loaded. Does nothing at the last entry of the history.
GoToAsync(string, CancellationToken)Navigates to a URL, and waits until the new document is loaded (its load event).
ReloadAsync(CancellationToken)Reloads the page, and waits until the new document is loaded.

GoBackAsync(CancellationToken)

BrowserPage.cs

Goes back in the history, and waits until the page is loaded. Does nothing at the first entry of the history.

public Task GoBackAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken
A token to cancel the wait.

Returns

Task A task completed once the page is loaded.

GoForwardAsync(CancellationToken)

BrowserPage.cs

Goes forward in the history, and waits until the page is loaded. Does nothing at the last entry of the history.

public Task GoForwardAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken
A token to cancel the wait.

Returns

Task A task completed once the page is loaded.

GoToAsync(string, CancellationToken)

BrowserPage.cs

Navigates to a URL, and waits until the new document is loaded (its load event).

public Task GoToAsync(string url, CancellationToken cancellationToken = default)

Parameters

url string
The URL, relative to WebAppBrowser.BaseAddress.
cancellationToken CancellationToken
A token to cancel the wait.

Returns

Task A task completed once the document is loaded.

ReloadAsync(CancellationToken)

BrowserPage.cs

Reloads the page, and waits until the new document is loaded.

public Task ReloadAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken
A token to cancel the wait.

Returns

Task A task completed once the document is loaded.